Multi-node system with global access states

ABSTRACT

A system may include several nodes coupled by an inter-node network configured to convey coherency messages between the nodes. Each node may include several active devices coupled by an address network and a data network. The nodes implement a coherency protocol such that if an active device in one of the nodes has an ownership responsibility for a coherency unit, no active device in any of the other nodes has a valid access right to the coherency unit. For example, if a node receives a coherency message requesting read access to a coherency unit from another node, the node may respond by conveying a proxy address packet, receipt of which removes ownership, on the node&#39;s address network to an owning active device. In contrast, the active device&#39;s ownership responsibility may not be removed in response to a device within the same node requesting read access to the coherency unit.

PRIORITY INFORMATION

This application claims priority to U.S. provisional application Ser.No. 60/462,027, entitled “MULTI-NODE SYSTEM WITH GLOBAL ACCESS STATES”,filed Apr. 11, 2003.

BACKGROUND OF THE INVENTION

1. Field of the Invention

This invention relates to the field of multiprocessor computer systemsand, more particularly, to coherency protocols employed withinmultiprocessor computer systems having shared memory architectures.

2. Description of the Related Art

Multiprocessing computer systems include two or more processors that maybe employed to perform computing tasks. A particular computing task maybe performed upon one processor while other processors perform unrelatedcomputing tasks. Alternatively, components of a particular computingtask may be distributed among multiple processors to decrease the timerequired to perform the computing task as a whole.

A popular architecture in commercial multiprocessing computer systems isa shared memory architecture in which multiple processors share a commonmemory. In shared memory multiprocessing systems, a cache hierarchy istypically implemented between the processors and the shared memory. Inorder to maintain the shared memory model, in which a particular addressstores exactly one data value at any given time, shared memorymultiprocessing systems employ cache coherency. Generally speaking, anoperation is coherent if the effects of the operation upon data storedat a particular memory address are reflected in each copy of the datawithin the cache hierarchy. For example, when data stored at aparticular memory address is updated, the update may be supplied to thecaches that are storing copies of the previous data. Alternatively, thecopies of the previous data may be invalidated in the caches such that asubsequent access to the particular memory address causes the updatedcopy to be transferred from main memory.

Shared memory multiprocessing systems generally employ either abroadcast snooping cache coherency protocol or a directory based cachecoherency protocol. In a system employing a snooping broadcast protocol(referred to herein as a “broadcast” protocol), coherence requests arebroadcast to all processors (or cache subsystems) and memory through atotally ordered address network. Each processor “snoops” the requestsfrom other processors and responds accordingly by updating its cachetags and/or providing the data to another processor. For example, when asubsystem having a shared copy observes a coherence request forexclusive access to the coherency unit, its copy is typicallyinvalidated. Likewise, when a subsystem that currently owns a coherencyunit observes a coherence request for that coherency unit, the owningsubsystem typically responds by providing the data to the requestor andinvalidating its copy, if necessary. By delivering coherence requests ina total order, correct coherence protocol behavior is maintained sinceall processors and memories observe requests in the same order.

In a standard broadcast protocol, requests arrive at all devices in thesame order, and the access rights of the processors are modified in theorder in which requests are received. Data transfers occur betweencaches and memories using a data network, which may be a point-to-pointswitched network separate from the address network, a broadcast networkseparate from the address network, or a logical broadcast network whichshares the same hardware with the address network. Typically, changes inownership of a given coherency unit occur concurrently with changes inaccess rights to the coherency unit.

Unfortunately, the standard broadcast protocol suffers from asignificant performance drawback. In particular, the requirement thataccess rights of processors change in the order in which snoops arereceived may limit performance. For example, a processor may have issuedrequests for coherency units A and B, in that order, and it may receivethe data for coherency unit B (or already have it) before receiving thedata for coherency unit A. In this case the processor must typicallywait until it receives the data for coherency unit A before using thedata for coherency unit B, thus increasing latency. The impactassociated with this requirement is particularly high in processors thatsupport out-of-order execution, prefetching, multiple coreper-processor, and/or multi-threading, since such processors are likelyto be able to use data in the order it is received, even if it differsfrom the order in which it was requested.

In contrast, systems employing directory-based protocols maintain adirectory containing information indicating the existence of cachedcopies of data. Rather than unconditionally broadcasting coherencerequests, a coherence request is typically conveyed through apoint-to-point network to the directory and, depending upon theinformation contained in the directory, subsequent coherence requestsare sent to those subsystems that may contain cached copies of the datain order to cause specific coherency actions. For example, the directorymay contain information indicating that various subsystems containshared copies of the data. In response to a coherence request forexclusive access to a coherency unit, invalidation requests may beconveyed to the sharing subsystems. The directory may also containinformation indicating subsystems that currently own particularcoherency units. Accordingly, subsequent coherence requests mayadditionally include coherence requests that cause an owning subsystemto convey data to a requesting subsystem. In some directory basedcoherency protocols, specifically sequenced invalidation and/oracknowledgment messages may be required. Numerous variations ofdirectory based cache coherency protocols are well known.

Typical systems that implement a directory-based protocol may beassociated with various drawbacks. For example, such systems may sufferfrom high latency due to the requirement that requests go first to adirectory and then to the relevant processors, and/or from the need towait for acknowledgment messages. In addition, when a large number ofprocessors must receive the request (such as when a coherency unittransitions from a widely shared state to an exclusive state), all ofthe processors must typically send ACKs to the same destination, thuscausing congestion in the network near the destination of the ACKs andrequiring complex logic to handle reception of the ACKs. Finally, thedirectory itself may add cost and complexity to the system.

In certain situations or configurations, systems employing broadcastprotocols may attain higher performance than comparable systemsemploying directory based protocols since coherence requests may beprovided directly to all processors unconditionally without theindirection associated with directory protocols and without the overheadof sequencing invalidation and/or acknowledgment messages. However,since each coherence request must be broadcast to all other processors,the bandwidth associated with the network that interconnects theprocessors in a system employing a broadcast snooping protocol canquickly become a limiting factor in performance, particularly forsystems that employ large numbers of processors or when a large numberof coherence requests are transmitted during a short period. In suchenvironments, systems employing directory protocols may attain overallhigher performance due to lessened network traffic and the avoidance ofnetwork bandwidth bottlenecks.

Thus, while the choice of whether to implement a shared memorymultiprocessing system using a broadcast snooping protocol or adirectory based protocol may be clear based upon certain assumptionsregarding network traffic and bandwidth, these assumptions can oftenchange based upon the utilization of the machine. This is particularlytrue in scalable systems in which the overall numbers of processorsconnected to the network can vary significantly depending upon theconfiguration.

SUMMARY

A system may include several nodes coupled by an inter-node networkconfigured to convey coherency messages between the nodes. Each node mayinclude several active devices coupled by an address network and a datanetwork. The nodes implement a coherency protocol such that if an activedevice in one of the nodes has an ownership responsibility for acoherency unit, no active device in any of the other nodes has a validaccess right to the coherency unit. For example, if a node receives acoherency message requesting read access to a coherency unit fromanother node, the node may respond by conveying a proxy address packeton the node's address network to an active device. Receipt of the proxyaddress packet may remove the active device's ownership responsibilityfor the coherency unit. In contrast, an active device within the nodemay request read access to a coherency unit by sending an address packeton the address network. Receipt of the address packet by an activedevice having an ownership responsibility for the coherency unit may notremove that device's ownership responsibility.

BRIEF DESCRIPTION OF THE DRAWINGS

A better understanding of the present invention can be obtained when thefollowing detailed description is considered in conjunction with thefollowing drawings, in which:

FIG. 1 is a block diagram of one embodiment of a multiprocessingcomputer system.

FIG. 2 is a diagram illustrating a portion of one embodiment of acomputer system.

FIG. 3 shows one embodiment of a mode table.

FIG. 4 illustrates one embodiment of a directory.

FIG. 4 a illustrates another embodiment of a directory.

FIG. 5 illustrates one embodiment of a method for mixed modedetermination and transmission.

FIG. 6 illustrates one embodiment of a method for dynamically changingtransmission modes.

FIG. 7 is a chart illustrating various requests that may be supported inone embodiment of a computer system.

FIG. 8 illustrates data packet transfers for cacheable transactions inaccordance with one embodiment of a computer system.

FIG. 9 illustrates various data packet transfers for non-cacheabletransactions that may be supported in one embodiment of a computersystem.

FIGS. 10A and 10B illustrate types of access rights and ownership statusthat may be implemented in one embodiment of a computer system.

FIG. 10C illustrates combinations of access rights and ownership statusthat may occur in one embodiment of a computer system.

FIG. 11 is a chart illustrating the effects of various transactions onownership responsibilities in one embodiment of a computer system.

FIGS. 12A-12F illustrate exemplary coherence operations that may beimplemented in broadcast mode in one embodiment of a computer system.

FIGS. 13A-13G illustrate exemplary coherence operations that may beimplemented in point-to-point mode in one embodiment of a computersystem.

FIG. 14 is a block diagram illustrating details of one embodiment ofeach of the processing subsystems of FIG. 1.

FIG. 15 is a block diagram illustrating further details regarding oneembodiment of each of the processing subsystems of FIG. 1.

FIGS. 15A-15D illustrate specific cache states that may be implementedin one embodiment.

FIG. 16 is a diagram illustrating multiple coherence transactionsinitiated for the same coherency unit in one embodiment of a computersystem.

FIG. 17 is a diagram illustrating communications between active devicesin accordance with one embodiment of a computer system.

FIG. 18 is a block diagram of another embodiment of a multiprocessingcomputer system.

FIG. 19 shows a block diagram of one embodiment of an address network.

FIG. 20 shows one embodiment of a multi-node computer system.

FIG. 21 shows exemplary global coherence states that may describe themaximum access right the devices in a node have to a particularcoherency unit in one embodiment of a multi-node computer system.

FIG. 22 shows exemplary proxy address packets that may be sent by aninterface in one embodiment of a multi-node computer system.

FIG. 23 shows exemplary data packets that may be sent to and from aninterface in one embodiment of a multi-node computer system.

FIG. 24 show the changes in global coherence state that may be made inresponse to receipt of one of the proxy address packets shown in FIG. 22in one embodiment of a multi-node computer system.

FIGS. 25-28 show exemplary RTO transactions in one embodiment of amulti-node computer system.

FIG. 29 shows one embodiment of an interface that may be included in amulti-node computer system.

FIGS. 30-32 show exemplary RTS transactions in one embodiment of amulti-node computer system.

FIGS. 33-34 show additional exemplary RTO transactions in one embodimentof a multi-node computer system.

FIGS. 35-36 shows exemplary memory response information that may bemaintained in some embodiments of a multi-node computer system.

FIG. 37 illustrates an exemplary RTS transaction in a multi-node systemin which a WB transaction for the same coherency unit is pending in thegM node, according to one embodiment.

FIG. 37A shows a method an interface in a gM node may implement torespond to requests for a coherency unit when there is no owning devicein the node, according to one embodiment.

FIG. 38 illustrates an exemplary WS transaction, according to oneembodiment.

FIG. 39 illustrates exemplary remote-type address packets that may beused in one embodiment.

FIG. 40 illustrates an exemplary RWB transaction, according to oneembodiment.

FIG. 41 shows an exemplary RWS transaction, according to one embodiment.

While the invention is susceptible to various modifications andalternative forms, specific embodiments thereof are shown by way ofexample in the drawings and will herein be described in detail. Itshould be understood, however, that the drawings and detaileddescription thereto are not intended to limit the invention to theparticular form disclosed, but on the contrary, the intention is tocover all modifications, equivalents and alternatives falling within thespirit and scope of the present invention as defined by the appendedclaims.

DETAILED DESCRIPTION OF EMBODIMENTS

Computer System

FIG. 1 shows a block diagram of one embodiment of a computer system 140.Computer system 140 includes processing subsystems 142A and 142B, memorysubsystems 144A and 144B, and an I/O subsystem 146 interconnectedthrough an address network 150 and a data network 152. In the embodimentof FIG. 1, each of processing subsystems 142, memory subsystems 144, andI/O subsystem 146 are referred to as a client device. It is noted thatalthough five client devices are shown in FIG. 1, embodiments ofcomputer system 140 employing any number of client devices arecontemplated. Elements referred to herein with a particular referencenumber followed by a letter will be collectively referred to by thereference number alone. For example, processing subsystems 142A-142Bwill be collectively referred to as processing subsystems 142.

Generally speaking, each of processing subsystems 142 and I/O subsystem146 may access memory subsystems 144. Devices configured to performaccesses to memory subsystems 144 are referred to herein as “active”devices. Each client in FIG. 1 may be configured to convey addressmessages on address network 150 and data messages on data network 152using split-transaction packets. Processing subsystems 142 may includeone or more instruction and data caches which may be configured in anyof a variety of specific cache arrangements. For example,set-associative or direct-mapped configurations may be employed by thecaches within processing subsystems 142. Because each of processingsubsystems 142 within computer system 140 may access data in memorysubsystems 144, potentially caching the data, coherency must bemaintained between processing subsystems 142 and memory subsystems 144,as will be discussed further below.

Memory subsystems 144 are configured to store data and instruction codefor use by processing subsystems 142 and I/O subsystem 146. Memorysubsystems 144 may include dynamic random access memory (DRAM), althoughother types of memory may be used in some embodiments. Each address inthe address space of computer system 140 may be assigned to a particularmemory subsystem 144, referred to herein as the home subsystem of theaddress. Additionally, each memory subsystem 144 may include a directorysuitable for implementing a directory-based coherency protocol. In oneembodiment, each directory may be configured to track the states ofmemory locations assigned to that memory subsystem within computersystem 140. Additional details regarding suitable directoryimplementations are discussed further below.

I/O subsystem 146 is illustrative of a peripheral device such as aninput-output bridge, a graphics device, a networking device, etc. Insome embodiments, I/O subsystem 146 may include a cache memory subsystemsimilar to those of processing subsystems 142 for caching dataassociated with addresses mapped within one of memory subsystems 144.

In one embodiment, data network 152 may be a logical point-to-pointnetwork. Data network 152 may be implemented as an electrical bus, acircuit-switched network, or a packet-switched network. In embodimentswhere data network 152 is a packet-switched network, packets may be sentthrough the data network using techniques such as wormhole, store andforward, or virtual cut-through. In a circuit-switched network, aparticular client device may communicate directly with a second clientdevice via a dedicated point-to-point link that may be establishedthrough a switched interconnect mechanism. To communicate with a thirdclient device, the particular client device utilizes a different link asestablished by the switched interconnect than the one used tocommunicate with the second client device. Data network 152 mayimplement a source-destination ordering property such that if a clientdevice C1 sends a data message D1 before sending a data message D2 and aclient device C2 receives both D1 and D2, C2 will receive D1 before C2receives D2.

Address network 150 accommodates communication between processingsubsystems 142, memory subsystems 144, and I/O subsystem 146. Messagesupon address network 150 are generally referred to as address packets.When the destination of an address packet is a storage location within amemory subsystem 144, the destination may be specified via an addressconveyed with the address packet upon address network 150. Subsequently,data corresponding to the address packet on the address network 150 maybe conveyed upon data network 152. Typical address packets correspond torequests for an access right (e.g., a readable or writable copy of acacheable coherency unit) or requests to perform a read or write to anon-cacheable memory location. Address packets may be sent by a devicein order to initiate a coherence transaction. Subsequent address packetsmay be sent to implement the access right and/or ownership changesneeded to satisfy the coherence request. In the computer system 140shown in FIG. 1, a coherence transaction may include one or more packetsupon address network 150 and data network 152. Typical coherencetransactions involve one or more address and/or data packets thatimplement data transfers, ownership transfers, and/or changes in accessprivileges.

As is described in more detail below, address network 150 may beconfigured to transmit coherence requests corresponding to read or writememory operations using a point-to-point transmission mode. Forcoherence requests that are conveyed point-to-point by address network150, a directory-based coherency protocol is implemented. In someembodiments, address network 150 may be configured to selectivelytransmit coherence requests in either point-to-point mode or broadcastmode. In such embodiments, when coherence requests are conveyed using abroadcast mode transmission, a snooping broadcast coherency protocol isimplemented.

In embodiments supporting both point-to-point and broadcast transmissionmodes, clients transmitting a coherence request to address network 150may be unaware of whether the coherence request will be conveyed withincomputer system 140 via a broadcast or a point-to-point modetransmission. In such an embodiment, address network 150 may beconfigured to determine whether a particular coherence request is to beconveyed in broadcast (BC) mode or point-to-point (PTP) mode. In thefollowing discussion, an embodiment of address network 150 that includesa table for classifying coherence requests as either BC mode or PTP modeis described.

Hybrid Network Switch

FIG. 2 is a diagram illustrating a portion of one embodiment of computersystem 140. FIG. 2 shows address network 150, memory subsystems 144,processing subsystems 142, and I/O subsystem 146. In the embodimentshown, address network 150 includes a switch 200 including a modecontrol unit 250 and ports 230A-230E. Mode unit 250 illustrativelyincludes a mode table 260 configured to store an indication of a mode ofconveyance, BC or PTP, for received coherence requests. Mode unit mayinclude special task oriented circuitry (e.g., an ASIC) or more generalpurpose processing circuitry executing software instructions. Processingunits 142A-142B each include a cache 280 configured to store memorydata. Memory subsystems 144A and 144B are coupled to switch 200 viaports 230B and 230D, respectively, and include controller circuitry 210,directory 220, and storage 225. In the embodiment shown, ports 230 mayinclude bi-directional links or multiple unidirectional links. Storage225 may include RAM or any other suitable storage device.

Also illustrated in FIG. 2 is a network 270 (e.g., a switched network orbus) coupled between a service processor (not shown), switch 200 andmemory subsystems 144. The service processor may utilize network 270 toconfigure and/or initialize switch 200 and memory subsystems 144, aswill be described below. The service processor may be external tocomputer system 140 or may be a client included within computer system140. Note that embodiments of computer system 140 that only implement aPTP transmission mode may not include mode unit 250, network 270, and/ora service processor.

As previously described, address network 150 is configured to facilitatecommunication between clients within computer system 140. In theembodiment of FIG. 2, processing subsystems 142 may perform reads orwrites which cause transactions to be initiated on address network 150.For example, a processing unit within processing subsystem 142A mayperform a read to a memory location A that misses in cache 280A. Inresponse to detecting the cache miss, processing subsystem 142A mayconvey a read request for location A to switch 200 via port 230A. Theread request initiates a read transaction. Mode unit 250 detects theread request for location A and determines the transmission modecorresponding to the read request. In embodiments utilizing a modetable, the mode unit determines the transmission mode by consulting modetable 260. In one embodiment, the read request includes an addresscorresponding to location A that is used to index into an entry in modetable 260. The corresponding entry may include an indication of the homememory subsystem corresponding to location A and a mode of transmissioncorresponding to location A.

In the above example, location A may correspond to a memory locationwithin storage 225A of memory subsystem 144A. Consequently, the entry inmode table 260 corresponding to the read request may indicate memorysubsystem 144A is a home subsystem of location A. If the entry in modetable 260 further indicates that the address of the read request isdesignated for PTP mode transmissions, switch 200 is configured to onlyconvey a corresponding request to memory subsystem 144A via port 230B.On the other hand, if the entry in mode table 260 indicates a BCtransmission mode, switch 200 may be configured to broadcast acorresponding request to each client within computer system 140. Thus,switch 200 may be configured to utilize either PTP or BC modes asdesired. Consequently, in this particular embodiment a single encodingfor a transaction conveyed by an initiating device may correspond toeither a BC mode or PTP mode transaction. The mode may be determined notby the client initiating a transaction, but by the address network. Thetransmission mode associated with switch 200 may be set according to avariety of different criteria. For example, where it is known that aparticular address space includes widely shared data, mode unit 250 maybe configured to utilize BC mode transactions. Conversely, for data thatis not widely shared, or data such as program code that is read only,mode unit 250 may be configured to utilize PTP mode. Further detailsregarding various other criteria for setting the mode of switch 200 willbe described further below.

Transmission Mode Table

Turning to FIG. 3, one embodiment of a mode table 260 is shown. Whilethe embodiment of FIG. 3 shows mode table 260 as being included withinmode unit 250, mode table 260 may be external to mode unit 250. Modetable 260 may include a dynamic data structure maintained within astorage device, such as RAM or EEPROM. In the embodiment of FIG. 3,table 260 is depicted as including columns 502, 504 and 506, and rows510. Each row 510 corresponds to a particular portion of the addressspace. For example, each row 510 may correspond to a particular page ofmemory or any other portion of address space. In one embodiment, theaddress space corresponding to a computer system 140 is partitioned intoregions called “frames.” These frames may be equal or unequal in size.Address column 502 includes an indication of the frame corresponding toeach row 510. Home column 504 includes an indication of a home subsystemcorresponding to each row 510. Mode column 506 includes an indication ofa transmission mode, BC or PTP, corresponding to each row 510 (and thuseach memory frame). Note that in some embodiments, there may not be anentry in home column 504 for BC mode address ranges.

In the embodiment shown in FIG. 3, entries in table 260 are directlymapped to a specific location. Therefore, row 510A corresponds to entryA, row 510B corresponds to entry B, and so on. In a direct mappedimplementation, table 260 need not actually include address column 502;however, it is illustrated for purposes of discussion. Each row 510 inthe embodiment shown corresponds to an address space of equal size. Asstated previously, table 260 may be initialized by a service processorcoupled to switch 200. Note that in other embodiments, table 260 may beorganized in an associative or other manner.

As illustrated in FIG. 3, row 510A contains an entry corresponding toaddress region A (502). In one embodiment, mode unit 250 may utilize acertain number of bits of an address to index into table 260. Forexample, address “A” in row 510A may correspond to a certain number ofmost significant bits of an address space identifying a particularregion. Alternatively, address “A” in row 510A may correspond to acertain number of significant bits and a certain number of lesssignificant bits of an address space identifying a particular region,where the region contains non-consecutive cache lines, in order tofacilitate interleaving of the cache lines. Row 510A indicates a home504 subsystem corresponding to “A” is CLIENT 3. Further, row 510Aindicates the mode 506 of transmission for transactions within theaddress space corresponding to region “A” is PTP. Row 510B correspondsto a region of address 502 space “B”, has a home 504 subsystem of CLIENT3, and a transmission mode 506 of BC. Each of the other rows 510 intable 260 includes similar information.

While the above description contemplates a mode unit 250 that includes amode table 260 for determining a transmission mode corresponding toreceived address packets, other embodiments are possible as well. Forexample, mode unit 250 may be configured to select a transmission modebased on network traffic. In such an implementation, mode unit 250 maybe configured to monitor link utilization and/or the state ofinput/output queues within switch 200. If mode unit 250 detects thatnetwork congestion is low, a packet may be broadcast to take advantageof available bandwidth. On the other hand, if the mode unit 250 detectsthat network congestion is high, a packet may be conveyed point-to-pointin order to reduce congestion. In such embodiments, mode unit 250 maycoordinate with a directory when switching between BC and PTP mode(e.g., a service processor may coordinate the mode unit and directory).Other embodiments may include tracking which address regions are widelyshared and using broadcasts for those regions. If it is determined aparticular address region is not widely shared or is read-only code, apoint-to-point mode may be selected for conveying packets for thoseregions. Alternatively, a service processor coupled to switch 250 may beutilized to monitor network conditions. In yet a further embodiment, themode unit 250 may be configured such that all coherence requests areserviced according to PTP mode transmissions or, alternatively,according to BC mode transmissions. For example, in scalable systems,implementations including large numbers of processors may be configuredsuch that mode unit 250 causes all address packets to be servicedaccording to PTP mode transmissions, while implementations includingrelatively small numbers of processors may be set according to BC modetransmissions. These and other embodiments are contemplated.

As mentioned above, when switch 200 receives a coherence request, modeunit 250 utilizes the address corresponding to the received coherencerequest as an index into table 260. In the embodiment shown, mode unit250 may utilize a certain number of most significant bits to form anindex. The index is then used to select a particular row 510 of table260. If the mode 506 indication within the selected row indicates PTPmode, a corresponding coherence request is conveyed only to the homesubsystem indicated by the home 504 entry within the row. Otherwise, ifthe mode 506 entry indicates BC mode, a corresponding coherence requestis broadcast to clients within the computer system. In alternativeembodiments, different “domains” may be specified within a singlecomputer system. As used herein, a domain is a group of clients thatshare a common physical address space. In a system where differentdomains exist, a transaction that is broadcast by switch 200 may be onlybroadcast to clients in the domain that corresponds to the receivedcoherence request. Still further, in an alternative embodiment, BC modecoherence requests may be broadcast only to clients capable of cachingdata and to the home memory subsystem. In this manner, certain coherencerequests that may be unnecessary may be avoided while still implementinga broadcast snooping style coherence protocol.

Directories

As stated previously, for coherence requests that are conveyed inpoint-to-point mode by switch 200, a directory based coherence protocolis implemented. As shown in FIG. 2, each memory subsystem 144 includes adirectory 220 that is used to implement a directory protocol. FIG. 4illustrates one example of a directory 220A that may be maintained by acontroller 210A within a memory subsystem 144A. In this embodiment,directory 220A includes an entry 620 for each memory block withinstorage 225A for which memory subsystem 144A is the home subsystem. Ingeneral, a directory may include an entry for each coherency unit forwhich the memory subsystem is a home subsystem. As used herein, a“coherency unit” is a number of contiguous bytes of memory that aretreated as a unit for coherency purposes. For example, if one bytewithin the coherency unit is updated, the entire coherency unit isconsidered to be updated. In some embodiments, the coherency unit may bea cache line or a cache block. Thus, in one embodiment, directory 220Amaintains an entry 620 for each cache line whose home is memorysubsystem 144A. In addition, directory 220A may include an entry foreach client 604-612 within computer system 140 that may have a copy ofthe corresponding cache line. Directory 220A may also include an entry614 indicating the current owner of the corresponding cache line. Eachentry in directory 220A indicates the coherency state of thecorresponding cache line in each client in the computer system. In theexample of FIG. 4, a region of address space corresponding to a frame“A” may be allocated to memory subsystem 144A. Typically, the size offrame A may be significantly larger than a coherency unit. Consequently,directory 220A may include several entries (i.e., Aa, Ab, Ac, etc.) thatcorrespond to frame A.

It is noted that numerous alternative directory formats to supportdirectory based coherency protocols may be implemented. For example,while the above description includes an entry 604-612 for each clientwithin a computer system, an alternative embodiment may only includeentries for groups of clients. For example, clients within a computersystem may be grouped together or categorized according to variouscriteria. For example, certain clients may be grouped into one categoryfor a particular purpose while others are grouped into another category.In such an embodiment, rather than including an indication for everyclient in a group, a directory within a memory subsystem 144 may includean indication as to whether any of the clients in a group have a copy ofa particular coherency unit. If a request is received for a coherencyunit at a memory subsystem 144 and the directory indicates that a group“B” may have a copy of the coherency unit, a corresponding coherencytransaction may be conveyed to all clients within group “B.” Bymaintaining entries corresponding to groups of clients, directories 220may be made smaller than if an entry were maintained for every client ina computer system.

Other directory formats may vary the information stored in a particularentry depending on the current number of sharers. For example, in someembodiments, a directory entry may include a pointer to a client deviceif there is a single sharer. If there are multiple sharers, thedirectory entry may be modified to include a bit mask indicating whichclients are sharers. Thus, in one embodiment, a given directory entrymay store either a bit mask or a pointer depending on the number ofsharers.

By maintaining a directory as described above, appropriate coherencyactions may be performed by a particular memory subsystem (e.g.,invalidating shared copies, requesting transfer of modified copies,etc.) according to the information maintained by the directory. Acontroller 210 within a subsystem 144 is generally configured to performactions necessary for maintaining coherency within a computer systemaccording to a specific directory based coherence protocol. For example,upon receiving a request for a particular coherency unit at a memorysubsystem 144, a controller 210 may determine from directory 220 that aparticular client may have a copy of the requested data. The controller210 may then convey a message to that particular client which indicatesthe coherency unit has been requested. The client may then respond withdata (e.g., if the coherency unit is modified) or with an acknowledgmentor any other message that is appropriate to the implemented coherencyprotocol. In general, memory subsystems 144 maintain a directory andcontroller suitable for implementing a directory-based coherencyprotocol. As used herein, a directory based cache coherence protocol isany coherence protocol that maintains a directory containing informationregarding cached copies of data, and in which coherence commands forservicing a particular coherence request are dependent upon theinformation contained in the directory.

General Operations

Turning next to FIG. 5, one embodiment of a method for mixed modedetermination and transmission is illustrated. An address network withina computer system is initially configured (block 300). Suchconfiguration may include initializing a mode control unit and/or a modetable via a service processor. During system operation, if the addressnetwork receives a coherence request from a client (decision block 302),the address network determines the transmission mode (block 304)corresponding to the received request. In the embodiment describedabove, the mode control unit 250 makes this determination by accessing amode table 260. If the mode corresponding to the request is determinedto be BC mode (decision block 306), a corresponding request is broadcastto clients in the computer system. In contrast, if the modecorresponding to the request is determined to be PTP mode (decisionblock 306), a corresponding request is conveyed point-to-point to thehome subsystem corresponding to the request and (not unconditionally) toother clients within the computer system.

During operation, it may be desirable to change the configuration ofswitch 200 to change the transmission mode for certain address frames(or for the entire computer system). For example, a mode unit 250 withinswitch 200 may be initially configured to classify a particular regionof address space with a PTP mode. Subsequently, during system operation,it may be determined that the particular region of address space iswidely shared and modified by different clients within the computersystem. Consequently, significant latencies in accessing data withinthat region may be regularly encountered by clients. Thus, it may bedesirable to change the transmission mode to broadcast for that region.While transmission mode configuration may be accomplished by usercontrol via a service processor, a mechanism for changing modesdynamically may alternatively be employed.

As stated previously, numerous alternatives are contemplated fordetermining when the transmission mode of a coherence request or aregion of address space may be changed. For example, in one embodimentan address switch or service processor may be configured to monitornetwork congestion. When the switch detects congestion is high, or someother condition is detected, the switch or service processor may beconfigured to change the modes of certain address regions from BC to PTPin order to reduce broadcasts. Similarly, if the switch or serviceprocessor detects network congestion is low or a particular condition isdetected, the modes may be changed from PTP to BC.

FIG. 6 illustrates one embodiment of a method for dynamically changingtransmission modes corresponding to coherence requests within an addressnetwork. An initial address network configuration (block 400) isperformed which may include configuring a mode table 260 as describedabove or otherwise establishing a mode of transmission for transactions.During system operation, a change in the transmission mode of switch 200may be desired in response to detection of a particular condition, asdiscussed above (decision block 402). In the embodiment shown, when thecondition is detected (decision block 402), new client transactions aretemporarily suspended (block 404), outstanding transactions within thecomputer system are allowed to complete (block 406), and the mode ischanged (block 408). In one embodiment, changing the mode may includeupdating the entries of mode table 260 as described above. It is furthernoted that to accommodate transitions from broadcast mode topoint-to-point mode, directory information (e.g., information whichindicates an owning subsystem) may be maintained even for broadcast modecoherence requests.

Generally speaking, suspending clients (block 404) and allowingoutstanding transactions within the computer system to complete (block406) may be referred to as allowing the computer system to reach aquiescent state. A quiescent state may be defined as a state when allcurrent traffic has reached its destination and there is no furthertraffic entering the computer system. Alternative embodiments mayperform mode changes without requiring a computer system to reach aquiescent state. For example, rather than waiting for all transactionsto complete, a mode change may be made upon arrival of all pendingaddress packets at their destination devices (but while data packets arestill being conveyed). Further, in embodiments which establishtransmission modes on the basis of regions of memory, as in thediscussion of frames above, a method may be such that only those currenttransactions which correspond to the frame whose mode is being changedneed complete. Various alternatives are possible and are contemplated.

Coherence Transactions

In one embodiment of computer system 140, read-to-share (RTS)transactions may be initiated by active devices upon address network 150by requesting read-only copies of coherency units. Similarly,read-to-own (RTO) transactions may be initiated by active devicesrequesting writable copies of coherency units. Other coherencetransactions may similarly be initiated by active devices upon addressnetwork 150, as desired. These coherence requests may be conveyed ineither PTP or BC mode in some embodiments, as described above.

FIG. 7 is a chart illustrating various coherence requests, including adescription of each, that may be supported by one embodiment of computersystem 140. As illustrated, in addition to read-to-share and read-to-ownrequests, further coherence requests that may be supported includeread-stream (RS) requests, write-stream (WS) requests, write-back (WB)requests, and write-back-shared (WBS) requests. A read-stream requestinitiates a transaction to provide a requesting device with a read-oncecopy of a coherency unit. A write-stream request initiates a transactionto allow a requesting device to write an entire coherency unit and sendthe coherency unit to memory. A write-back request initiates atransaction that sends a coherency unit from an owning device to memory,where the owning device does not retain a copy. Finally, awrite-back-shared request initiates a transaction that sends a coherencyunit from an owning device to memory, where the owning device retains aread-only copy of the coherency unit. Active devices may also beconfigured to initiate other transaction types on address network 150such as I/O read and write transactions and interrupt transactions usingother requests. For example, in one embodiment, a read-to-write-back(RTWB) transaction may also be supported to allow I/O bridges (or otherdevices) to perform a write to part of a coherency unit without gainingownership of the coherency unit and responding to foreign requests forthe coherency unit.

It is noted that transactions may be initiated upon address network 150by sending encoded packets that include a specified address. Datapackets conveyed on data network 152 may be associated withcorresponding address transactions using transaction IDs, as discussedbelow.

In one embodiment, cacheable transactions may result in at least onepacket being received by the initiating client on the data network 152.Some transactions may require that a packet be sent from the initiatingclient on the data network 152 (e.g., a write-back transaction). FIG. 8illustrates data packet transfers on data network 152 that may resultfrom various transactions in accordance with one embodiment of computersystem 140. A PRN data packet type is a pull request, sent from thedestination of a write transaction to the source of the writetransaction, to send data. An ACK data packet type is a positiveacknowledgment from an owning device allowing a write stream transactionto be completed. A NACK data packet type is a negative acknowledgment tomemory aborting a WB, WBS, or to the initiator aborting an INTtransaction.

When an initiator initiates a transaction, the address packet for thattransaction may include a transaction ID. In one embodiment, thetransaction ID may be formed by the initiator's device ID and a packetID assigned by the initiator. The DATA, ACK and/or PRN packets that theinitiator receives may be routed to the initiator through data network152 by placing the initiator's device ID in the packets' routingprefixes. In addition, the DATA, ACK and/or PRN packets may contain adestination packet ID field which matches the packet ID assigned by theinitiator, allowing the initiator to match the DATA, ACK, and/or PRNpacket to the correct transaction. Furthermore, PRN packets may includea pull ID consisting of the source's device ID and a packet ID assignedby the source (that is, the client which sent the PRN packet). Afterreceiving a PRN packet, the initiator may send a DATA or NACK packet tothe source of the PRN. This DATA or NACK packet may be routed by placingthe device ID of the source of the PRN in the packet's routing prefix.The DATA or NACK packet may contain a destination packet ID field thatallows it to be matched with the correct PRN (in addition, the packetmay include a flag which indicates that it was sent in response to aPRN, thus preventing confusion between transaction IDs and pull IDs).

In one embodiment, an ACK packet sent in response to a WS may notcontain any data. The ACK packet may be used to indicate theinvalidation of the previous owner. The PRN packet that an initiatorreceives as part of a cacheable transaction is sent by the memory devicethat maps the coherency unit. The DATA or NACK packet that the initiatorsends is sent to the memory device that maps the coherency unit (whichis also the source of the PRN received by the initiator).

As illustrated in FIG. 8, the initiator may receive separate DATA andPRN packets for a RTWB transaction. However, when the owner of thecoherency unit is the memory device that maps the coherency unit, thesetwo packets would be sent by the same client. Thus, in one embodiment,instead of sending two packets in this situation, a single DATAP packetmay be sent. A DATAP package combines the information of a DATA packetand a PRN packet. Similarly, a single PRACK packet, which combines theinformation of a PRN packet and an ACK packet, may be sent in responseto a WS request when the owner of the coherency unit is the memorydevice that maps the coherency unit. Finally, in those cases where theinitiator is the owner of the coherency unit, the initiator may not senda DATA or ACK packet to itself (logically, this can be viewed as atransmission of a DATA or ACK packet from the initiator to itself whichdoes not leave the initiator). Similarly, in those cases where theinitiator is the memory device that maps the coherency unit, theinitiator may not send a PRN packet to itself, nor need it send a DATAor NACK packet to itself.

In the embodiment of FIG. 1, non-cacheable transactions and interruptmay similarly result in at least one packet being received by theinitiating client from the data network, and some transactions mayrequire that a packet be sent from the initiating client device on thedata network. FIG. 9 illustrates various non-cacheable and interrupttransaction types that may be supported in one embodiment of computersystem 140, along with resulting data packet types that may be conveyedon data network 152. The columns in FIG. 9 are indicative of thesequence of packets sent on the address and data networks, in order fromleft to right.

The DATA, PRN, or NACK packets that an initiator may receive as part ofnon-cacheable and interrupt transactions are routed to the initiatorthrough data network 152 and may be matched to the correct transactionat the receiver through the use of transaction IDs, as was described forcacheable data transfers. Similarly, the DATA packets that the initiatorsends may be routed to their destination and matched to the correcttransaction at their destination through the use of pull IDs, as wasdescribed for cacheable transactions.

For RIO and WIO transactions, the DATA, and/or PRN packets that theinitiator receives are sent from the client that maps the coherencyunit. For INT transactions, the PRN or NACK packet that the initiatorreceives is sent from the target of the interrupt (which may bespecified in an address field of the INT packet). When the initiatorsends a DATA packet, it sends the DATA packet to the source of the PRNthat it received. It is noted that when the initiator would be both thesource and destination of a DATA, PRN, or NACK packet, no DATA, PRN, orNACK packet needs to be sent. It is also noted that when an initiatorreceives a PRN packet in response to an INT transaction, the initiatorsends a data packet. When the initiator receives a NACK packet as partof an INT transaction, the initiator may not send any packet on the datanetwork.

Coherency Mechanism

Computer system 140 employs a cache coherence protocol to provide acoherent view of memory for clients with caches. For this purpose, stateinformation for each coherency unit may be maintained in each activedevice. The state information specifies the access rights of the activedevice and the ownership responsibilities of the active device.

The access right specified by the state information for a particularcoherency unit is used to determine whether the client device can commita given operation (i.e., a load or a store operation) and constraints onwhere that operation can appear within one or more partial or totalorders. In one embodiment, the memory access operations appear in asingle total order called the “global order.” In such an embodiment,these constraints upon where an operation can be placed in the globalorder can be used to support various well-known memory models, such as,for example, a sequentially consistent memory model or total-store-order(TSO), among others.

The ownership responsibility specified by the state information for aparticular coherency unit indicates whether the client device isresponsible for providing a copy of the coherency unit to another clientthat requests it. A client device owns a coherency unit if it isresponsible for providing data to another client which requests thatcoherency unit.

In one embodiment, the coherence protocol employed by computer system140 is associated with the following properties:

-   -   1) Changes in ownership status occur in response to the        reception of address packets. Sending address packets, sending        data packets, and receiving data packets do not affect the        ownership status;    -   2) An active device may own a coherency unit without having the        data associated with that ownership responsibility;    -   3) Access rights transition with receiving address packets,        sending data packets, and receiving data packets. Sending        address packets does not affect the access rights (although it        may affect the way in which other packets are processed);    -   4) An active device which has an access right to a coherency        unit always has the data associated with that access right; and    -   5) Reception of address packets is not blocked based on the        reception of particular data packets. For example, it is        possible to receive a local read request packet before the data        being requested is also received.

Since access rights and ownership status can transition separately inthe protocol employed by computer system 140, various combinations ofcoherence states are possible. FIGS. 10A and 10B illustrate types ofaccess rights and ownership status that may occur in one embodiment ofcomputer system 140. FIG. 10C illustrates possible combinations ofaccess rights and ownership status. It is noted that these combinationsdiffer from those of traditional coherence protocols such as thewell-known MOSI protocol. It is also noted that other specific forms ofaccess rights may be defined in other embodiments.

As illustrated in FIG. 10A, the W (Write) access right allows both readsand writes. The A (All-Write) access right allows only writes andrequires that the entire coherency unit be written. The R (Read) accessright allows only reads. The T (Transient-Read) access right allows onlyreads; however, unlike reads performed under the W or R access rights,reads performed under the T access right may be reordered, as discussedbelow. Finally, the I (Invalid) access right allows neither reads norwrites.

When the system is first initialized, all active devices have the Iaccess right for all coherency units. As will be discussed furtherbelow, when a coherency unit is in the A access right state, because theentire coherency unit must be modified, the data contained in thecoherency unit prior to this modification is not needed and may not bepresent. Instead, an ACK packet, which acts as a token representing thedata, must have been received if the data is not present.

As illustrated in FIG. 10B, an active device may have an O (owner)ownership status or an N (non-owner) ownership status with respect to agiven coherency unit. In either state, data corresponding to thecoherency unit may or may not be present in the cache.

Once an active device has acquired a given access right, it may exercisethat access right repeatedly by performing multiple reads and/or writesuntil it loses the access right. It is noted that for access rightsother than A (All-Write), an active device is not required to exerciseits read and/or write access rights for a given coherency unit. Incontrast, the A access right requires that the entire coherency unit bewritten, so the active device must perform at least one write to eachbyte in the coherency unit.

In the embodiment of FIG. 1, changes in access rights may occur inresponse to receiving address packets, sending data packets, orreceiving data packets. Generally speaking, and as will be described infurther detail below, when a transaction transfers exclusive access to acoherency unit from a processor P1 to a processor P2, the sending of thedata from P1 terminates P1's access right to the coherency unit and thereception of the data at P2 initiates P2's access right. When atransaction changes exclusive access to a coherency unit at a processorP1 to a shared state with a processor P2 (i.e., each having a readaccess right), the sending of the data from P1 terminates P1's writeaccess right (though it can continue to read the coherency unit) and thearrival of the data at P2 initiates its shared access right. When atransaction transfers a coherency unit from a shared state to exclusiveaccess at a processor P2, the access rights at all processors other thanP2 and the processor which owns the coherency unit (if any) areterminated upon reception of the coherence request, the access right ofthe processor that owns the coherency unit (if there is one) isterminated when it sends the data, and the write access right at P2 isinitiated once P2 has received the data from the previous owner (or frommemory) and has received the coherence request. Finally, when acoherence request adds a processor P2 to a set of processors that isalready sharing a coherency unit, no processor loses access rights andP2 gains the read access right when it receives the data.

Ownership responsibilities may transition in response to the receptionof address packets. In the embodiment of FIG. 1, sending and receivingdata packets do not affect ownership responsibilities. FIG. 11 is achart illustrating ownership transitions in response to particulartransactions in one embodiment of computer system 140. In FIG. 11,“previous owner” indicates that ownership is unchanged, “initiator”indicates that the client who initiated the transaction becomes theowner, and “memory” indicates that the memory subsystem 144 that mapsthe coherency unit becomes the owner. In the case of a WB or WBStransaction, the new owner is the memory if the initiator sends a DATApacket to the memory, and the new owner is the previous owner if theinitiator sends a NACK packet to the memory. The owner of the coherencyunit is either an active device or the memory device that maps thecoherency unit. Given any cacheable transaction T which requests a dataor ACK packet, the client that was the owner of the coherency unitimmediately preceding T will send the requested data or ACK packet. Whenthe system is first initialized, memory is the owner for each coherencyunit.

FIG. 4A shows an exemplary directory 220B that may store informationregarding the access rights and ownership responsibilities held byvarious client devices for each coherency unit mapped by the directory.Instead of storing information related to the MOSI states (as shown inFIG. 4), directory 220B stores information relating to the coherenceprotocol described above. Thus, directory 220B identifies which clientdevice, if any, has an ownership responsibility for a particularcoherency unit. Directory 220B may also track which client devices havea shared access right to the coherency unit. For example, a directoryentry 620 may indicate the access rights of each client device (e.g.,read access R, write access W, or invalid access I) to a coherency unit.Note that in other embodiments, additional or different information maybe included in a directory 220B. Furthermore, some directories mayinclude less information. For example, in one embodiment, a directorymay only maintain information regarding ownership responsibilities foreach coherency unit.

Virtual Networks and Ordering Points

In some embodiments, address network 150 may include four virtualnetworks: a Broadcast Network, a Request Network, a Response Network,and a Multicast Network. Each virtual network is unordered with respectto the other virtual networks. Different virtual networks may beconfigured to operate in logically different ways. Packets may bedescribed in terms of the virtual network on which they are conveyed. Inthe following discussion, a packet is defined to be “received” (or“sent”) when any changes in ownership status and/or access rights inresponse to the packet at the receiving client (or the sending client)have been made, if necessary, pursuant to the coherence protocol.

The Broadcast Network may implement a logical broadcast medium betweenclient devices within a computer system and only convey packets for BCmode transactions. In one embodiment, the Broadcast Network may satisfythe following ordering properties:

-   -   1) If a client C1 sends a broadcast packet B1 for a        non-cacheable or interrupt address before sending a broadcast        packet B2 for a non-cacheable or interrupt address, and if a        client C2 receives packets B1 and B2, then C2 receives B1 before        it receives B2.    -   2) If clients C1 and C2 both receive broadcast packets B1 and        B2, and if C1 receives B1 before it receives B2, then C2        receives B1 before it receives B2.

The Request Network may implement a logical point-to-point mediumbetween client devices in a computer system and may only convey packetsfor PTP mode transactions. In one embodiment, coherence requests sent onthe Request Network are sent from the client device that initiates atransaction to the device that maps the memory location corresponding tothe transaction. The request network may implement the followingordering property:

-   -   1) If a client C1 sends a request packet R1 for a non-cacheable        or interrupt address before sending a request packet R2 for a        non-cacheable or interrupt address, and if a client C2 receives        request packets R1 and R2, then C2 receives R1 before it        receives R2.

The Response Network may also implement a logical point-to-point mediumbetween client devices in a computer system and may only be used for PTPmode transactions. Packets sent on the Response Network may implementrequests for data transfers and changes of ownership. In one embodiment,packets sent on the Response Network are only sent to requesting and/orowning clients. The Response Network may implement the followingordering property:

-   -   1) If a client C1 sends a response packet R1 before sending a        response packet R2, and if a client C2 receives packets R1 and        R2, and if R1 and R2 were both sent for transactions that        reference the same coherency unit, then C2 receives R1 before it        receives R2.

Finally, the Multicast Network may implement a logicalpoint-to-multipoint medium between client devices in a computer systemand is used only for PTP mode transactions. In one embodiment, packetssent on the Multicast Network are sent to the requesting client andnon-owning sharers in order to implement changes in access rights.Packets on the Multicast Network may also be sent to additional clientsin some embodiments. For example, a computer system may be divided intoN portions, and a directory may indicate whether there are non-owningdevices that have shared copies of a given coherency unit in each of theN portions. If a single non-owning device in a given portion has sharedaccess to a coherency unit, a multicast may be sent to each device inthat portion. The Multicast Network may implement the following orderingproperty:

-   -   1) If a client C1 sends a multicast packet M1 before sending a        multicast packet M2, and if a client C2 receives packets M1 and        M2, then C2 receives M1 before it receives M2.

In the embodiment of computer system 140 discussed above, variousordering points are established within the computer system. Theseordering points govern ownership and access right transitions. One suchordering point is the Broadcast Network. The Broadcast Network is theordering point for cacheable and non-cacheable BC mode transactionscorresponding to a given memory block. All clients in a computer systemor domain receive broadcast packets for a given memory block in the sameorder. For example, if clients C1 and C2 both receive broadcast packetsB1 and B2, and C1 receives B1 before B2, then C2 also receives B1 beforeB2.

In other situations, a client may serve as an ordering point. Moreparticularly, in the embodiment described above, for cacheable PTP modeaddress transactions, the order in which requests are serviced by thehome memory subsystem directory establishes the order of the PTP modetransactions. Ordering for non-cacheable PTP mode address transactionsmay be established at the target of each non-cacheable transaction.

Packets in the same virtual network are subject to the orderingproperties of that virtual network. Thus, packets in the same virtualnetwork may be ordered with respect to each other. However, packets indifferent virtual networks may be partially or totally unordered withrespect to each other. For example, a packet sent on the Multicastnetwork may overtake a packet sent on the Response network and viceversa.

In addition to supporting various virtual networks, computer system 140may be configured to implement the Synchronized Networks Property. TheSynchronized Networks Property is based on the following orders:

-   -   1) Local Order (<_(l)): Event X precedes event Y in local order,        denoted X<_(l)Y, if X and Y are events (including the sending or        reception of a packet on the address or data network, a read or        write of a coherency unit, or a local change of access rights)        which occur at the same client device C and X occurs before Y.    -   2) Message Order (<_(m)): Event X precedes event Y in message        order, denoted X<_(m) Y, if X is the sending of a packet M on        the address or data network and Y is the reception of the same        packet M.    -   3) Invalidation Order (<_(i)): Event X precedes event Y in        invalidation order, denoted X<_(i) Y, if X is the reception of a        broadcast or multicast packet M at a client device C1 and Y is        the reception of the same packet M at a client C2, where C1 does        not equal C2, and where C2 is the initiator of the transaction        that includes the multicast or broadcast packet.        Using the orders defined above, the Synchronized Networks        Property holds that:    -   1) The union of the local order <_(l), the message order <_(m),        and the invalidation order <_(i) is acyclic.        The Synchronized Networks Property may also be implemented in        embodiments of address network 150 that do not support different        virtual networks.        Coherence Transactions in Broadcast (BC) Mode

The following discussion describes how one embodiment of computer system140 may perform various coherence transactions for coherency units in BCmode. In one embodiment of a computer system supporting both BC and PTPmodes, BC mode address packets may be conveyed on a broadcast virtualnetwork like the one described above.

The transitioning of access rights and ownership responsibilities ofclient devices for coherency transactions in BC mode may be betterunderstood with reference to the exemplary coherence operations depictedin FIGS. 12A-12F. Note that the examples shown in FIGS. 12A-12F aremerely exemplary. For simplicity, these examples show devices involvedin a particular transaction and do not show other devices that may alsobe included in the computer system. FIG. 12A illustrates a situation inwhich an active device D1 has a W (write) access right and ownership (asindicated by the subscript “WO”). An active device D2 (which has aninvalid access right and is not an owner, as indicated by the subscript“IN”) initiates an RTS in order to obtain the R access right. In thiscase, D1 will receive the RTS packet from D2 through address network150. Since the RTS packet is broadcast, D2 (and any other client devicesin computer system 140) also receives the RTS packet through addressnetwork 150. In response to the RTS, D1 sends a corresponding datapacket (containing the requested data) to device D2. It is noted that D1can receive additional address and data packets before sending thecorresponding data packet to D2. When D1 sends the corresponding datapacket to D2, D1 loses its W access right and changes its access rightto an R access right. When D2 receives the corresponding data packet, itacquires an R access right. D1 continues to maintain ownership of thecoherency unit.

FIG. 12B illustrates a situation in which an active device D1 has a Waccess right and ownership (as indicated by the subscript “WO”), and anactive device D2 (which has invalid access and no ownership) initiatesan RTO transaction in order to obtain a W access right. In this case, D1will receive the RTO packet from D2 over address network 150. As aresult, D1 changes its ownership status to N (not owner) and sends acorresponding data packet to D2. It is noted, however, that D1 canreceive additional address and/or data packets before sending thecorresponding data packet to D2. D2 also receives its own RTO viaaddress network 150 since the RTO is broadcast. When D1 sends thecorresponding data packet to D2, D1 loses its W access right and changesits right to an I access right. When D2 receives its own RTO via addressnetwork 150, its ownership status changes to O (owned). When D2 receivesthe corresponding data packet, it acquires a W access right.

FIG. 12C illustrates a situation in which an active device D1 has a read(R) access right to and ownership of a particular coherency unit. Activedevices D2 and D3 also have an R access right to the coherency unit.Devices D2 and D3 do not have an ownership responsibility for thecoherency unit. Active device D3 sends an RTO in order to obtain a Waccess right. In this case, D1 will receive the RTO from D3 via addressnetwork 150. Upon receipt of the RTO address packet, D1 changes itsownership status to N (no ownership) and sends a corresponding datapacket (DATA) to D3. It is noted, however, that D1 can receiveadditional address and data packets before sending the correspondingdata packet to D3. When D1 sends the corresponding data packet to D3, D1changes its access right to an I access right. In addition, D2 will alsoreceive the RTO via address network 150. When D2 receives the RTO, itchanges its R access right to an I access right. Furthermore, when D3receives its own RTO via address network 150, its ownership status ischanged to O. When D3 receives the corresponding data packet (DATA) fromD1, it acquires a W access right to the coherency unit. It is noted thatthe corresponding data packet and its own RTO may be received by D3before the invalidating RTO packet arrives at D2. In this case, D2 couldcontinue to read the coherency unit even after D3 has started to writeto it.

FIG. 12D illustrates a situation in which an active device D1 has an Raccess right and ownership of a particular coherency unit, active deviceD2 has an R access right (but not ownership) to the coherency unit, andactive device D3 issues an RTS in order to obtain the R access right tothe coherency unit. In this case, D1 will receive the RTS from D3 viathe address network 150. In response to the RTS, D1 sends acorresponding data packet to D3. When D3 receives the corresponding datapacket, its access right changes from an I access right to an R accessright. The reception of the RTS at D1 and D2 does not cause a change inthe access rights at D1 or D2. Furthermore, receipt of the RTS addresspacket at D1 and D2 does not cause any change in ownership for thecoherency unit.

In the case of WS (Write Stream) transaction in which an entirecoherency unit is written by an active device and sent to memory, thedevice initiating the WS may receive an ACK packet from the processingsubsystem 142 (or memory subsystem 144) that most recently (in addressbroadcast order) owned the coherency unit. It is noted that this ACKpacket may be sent in place of a regular data message (and in fact adata packet may be used), and that only one such ACK message may be sentin response to the WS.

FIG. 12E illustrates a situation in which an active device D1 has an Raccess right and ownership of a coherency unit and an active device D2initiates a WS transaction for that coherency unit. As shown, the WSrequest is received by D1 as well as the home memory subsystem 144 thatmaps the coherency unit through address network 150. In response to D2'sWS packet, D1 sends a corresponding ACK packet to D2 (e.g., on datanetwork 152). It is noted, however, that D1 can receive additionaladdress and data packets before sending the corresponding ACK packet toD2. When D1 sends the corresponding ACK packet to D2, D1 changes itsaccess right to an I access right. When D2 receives the ACK packet fromD1, its access right changes to A (All-Write). In addition, the memorysubsystem (M) that maps the coherency unit forwards a PRN packet on datanetwork 152 to D2. When D2 writes to the entire coherency unit, D2forwards a data packet to the memory subsystem M. Upon receipt of the WSrequest through address network 150, D1 changes its ownership status toN (not-owned), and the memory subsystem M changes its ownership statusto owned.

FIG. 12F illustrates a situation in which an active device D1 has a Waccess right and ownership of a coherency unit and initiates a WBtransaction in order to write that coherency unit back to memory. Thememory subsystem (M) that maps the coherency unit receives the WB packetthrough address network 150, and responsively forwards a PRN packetthrough data network 152 to D1. As a result, D1 sends a correspondingdata packet (DATA) to memory M. It is noted that D1 can receiveadditional address and/or data packets before sending the correspondingdata packet to memory M. When D1 receives its own WB through addressnetwork 150, its ownership status changes to N. When D1 sends thecorresponding data packet to memory M, its access right is changed to anI access right. In response to receiving the WB packet on the addressnetwork 152, memory M may become the owner of the coherence unit. WBS(write back shared) transactions may be handled similarly.

It is contemplated that numerous variations of computer systems may bedesigned that employ the principle rules for changing access rights inactive devices as described above while in BC mode. Such computersystems may advantageously maintain cache consistency while attainingefficient operation. It is noted that embodiments of computer system 140are possible that implement subsets of the transactions described abovein conjunction with FIGS. 12A-12F. Furthermore, other specifictransaction types may be supported, as desired, depending upon theimplementation.

It is also noted that variations with respect to the specific packettransfers described above for a given transaction type may also beimplemented. Additionally, while ownership transitions are performed inresponse to receipt of address packets in the embodiments describedabove, ownership transitions may be performed differently during certaincoherence transactions in other embodiments.

In addition, in accordance with the description above, an owning devicemay not send a corresponding data packet immediately in response toreceiving a packet (such as an RTO or RTS) corresponding to atransaction initiated by another device. In one embodiment, a maximumtime period (e.g., maximum number of clock cycles, etc.) may be used tolimit the overall length of time an active device may expend beforesending a responsive data packet.

Coherence Transactions in Point-to-Point (PTP) Mode

FIGS. 13A-13G illustrate how various coherence transactions may becarried out in PTP mode. In the following discussion, a variety ofscenarios are depicted illustrating coherency activity in a computersystem utilizing one exemplary directory-based coherency protocol,although it is understood that other specific protocols mayalternatively be employed. In some embodiments, PTP-mode address packetsmay be conveyed in one of three virtual networks: the Request Network,the Response Network, and the Multicast Network.

In one embodiment of a computer system that implements PTP modetransactions on address network 150, a device may initiate a transactionby sending a request packet on the Request Network. The Request Networkmay convey the request packet to the device that maps the coherency unit(the home subsystem for that coherency unit) corresponding to therequest packet. In response to receiving a request packet, the homesubsystem may send one or more packets on the Response, Multicast,and/or Data Networks.

FIG. 13A is a diagram depicting coherency activity for an exemplaryembodiment of computer system 140 as part of a read-to-own (RTO)transaction upon address network 150. A read-to-own transaction may beperformed when a cache miss is detected for a particular coherency unitrequested by a processing subsystem 142 and the processing subsystem 142requests write permission to the coherency unit. For example, a storecache miss may initiate an RTO transaction. As another example, aprefetch for a write may initiate an RTO transaction.

In FIG. 13A, the requesting device D1 initiates a read-to-owntransaction. D1 has the corresponding coherency unit in an invalid state(e.g., the coherency unit is not stored in the device) and is not theowner of the corresponding coherency unit, as indicated by the subscript“IN.” The home memory subsystem M is the owner of the coherency unit.The read-to-own transaction generally causes transfer of the requestedcoherency unit to the requesting device D1.

Upon detecting a cache miss, the requesting device D1 sends aread-to-own coherence request (RTO) on the address network 150. Sincethe request is in PTP mode, address network 150 conveys the request tothe home memory subsystem M of the coherency unit. In some embodiments,home memory subsystem M may block subsequent transactions to therequested coherency unit until the processing of the RTO transaction iscompleted at M. In one embodiment, home memory subsystem may include anaddress agent to process address packets and a data agent that processesdata packets (e.g., the data agent may send a data packet in response toa request from the address agent). In such an embodiment, the homememory subsystem may unblock subsequent transactions to the requestedcoherency unit as soon as the address agent has finished processing theRTO packet.

Home memory subsystem M detects that no other devices have a sharedaccess right to the coherency unit and that home memory subsystem M isthe current owner of the coherency unit. The memory M updates thedirectory to indicate that the requesting device D1 is the new owner ofthe requested coherency unit and sends a response RTO to the requestingdevice D1 (e.g., on the Response Network). Since there are no sharingdevices, home memory subsystem M may supply the requested data (DATA)directly to the requesting device D1. In response to receiving the RTOpacket on address network 150, device D1 may gain ownership of therequested coherency unit. In response to receiving both the RTO and theDATA packet, device D1 may gain a write access right to the coherencyunit. Write access is conditioned upon receipt of the RTO becausereceipt of the RTO indicates that shared copies of the requestedcoherency unit have been invalidated.

FIG. 13B shows an example of an RTO transaction where there are sharingdevices D2 that have a read access right to the requested coherencyunit. In this example, an active device D1 has a R access right but notownership to a coherency unit and initiates an RTO transaction in orderto gain a W access right to that coherency unit. The address network 150conveys the RTO request to the home memory subsystem M. Based oninformation stored in a directory, home memory subsystem M detects thatthere are one or more devices D2 with a shared access right to thecoherency unit. In order to invalidate the shared copies, home memorysubsystem M conveys an invalidating request (INV) to the devices D2 thathave a shared access right to the data (e.g., on the Multicast Network).In this example, memory subsystem M is the owner of the requestedcoherency unit so memory M also forwards a data packet (DATA)corresponding to the requested coherency unit to the requesting deviceD1.

Receipt of invalidating request INV causes devices D2 to lose the sharedaccess right to the coherency unit (i.e., devices D2 transition theiraccess rights to the I (invalid) access right). With respect to each ofdevices D2, the invalidating request INV is a “foreign” invalidatingrequest since it is not part of a transaction initiated by thatparticular device. The home memory subsystem M also conveys theinvalidating request INV to requesting device D1 (e.g., on the MulticastNetwork). Receipt of the INV by the requesting device indicates thatshared copies have been invalidated and that write access is nowallowed. Thus, upon receipt of the DATA from memory M and the INV,device D1 may gain write access to the coherency unit.

In addition to sending the invalidating request INV to requesting deviceD1, home memory subsystem M also sends requesting device D1 a datacoherency response WAIT (e.g., on the Response Network). The WAITresponse indicates that device D1 should not gain access to therequested coherency unit until D1 has received both the data and aninvalidating request INV. D1 may regard the INV as a “local”invalidating request since it is part of the RTO transaction initiatedby D1. Thus, the recipient of a local invalidating request (inconjunction with the receipt of a local DATA packet) may gain an accessright to the coherency unit while the recipient of a foreigninvalidating request loses an access right to the coherency unit. Asmentioned briefly above, if the WAIT and INV packets are sent ondifferent virtual networks, it may be possible for device D1 to receivethe packets in any order if the virtual networks are unordered withrespect to each other. Furthermore, since the DATA packet is conveyed ondata network 140, the DATA packet may be received before either of theaddress packets in some embodiments. Accordingly, if device D1 receivesthe WAIT response, device D1 may not transition access rights to thecoherency unit until both the DATA and the INV have been received.However, if device D1 receives the INV and the DATA before the WAIT,device D1 may gain an access right to the coherency unit, since the INVindicates that any shared copies have been invalidated. When device D1receives the WAIT response, it may gain ownership responsibilities forthe requested coherency unit, regardless of whether the DATA and INVhave already been received.

Returning to FIG. 13A, if the requesting device D1 receives the DATAbefore the RTO response from home memory subsystem M, D1 may not gain anaccess right to the data until it also receives the RTO response (sinceD1 may otherwise be unaware of whether there are any shared copies thatshould be invalidated before D1 gains an access right to the requesteddata). Once D1 receives the RTO, it may transition its access rights tothe coherency unit since receipt of the RTO (as opposed to a WAIT)response indicates that there is no need to wait for an INV. Note thatin alternative embodiments, the home memory subsystem M may always sendthe requesting device an INV (or similar indication that shared copies,if any, have been invalidated) in response to a request (e.g., RTO orWS) that requires shared copies to be invalidated, even if there are noshared copies, so that a separate WAIT packet is unnecessary. In onesuch embodiment, the address network (as opposed to the home memorysubsystem) may return the coherency reply (e.g., the RTO response) thatcauses an ownership transition to the requesting device.

As mentioned above, in some embodiments, computer system 140 may beconfigured to send some requests in both BC and PTP modes, andrequesting devices such as D1 may be unaware of the mode in which aparticular request is transmitted. In such embodiments, however,requesting devices may be configured to transition ownershipresponsibilities and access rights correctly regardless of the mode inwhich the request is transmitted. For example, in BC mode, the requestermay receive its own RTO on the Broadcast Network (as opposed to on theResponse Network from the home memory subsystem). In response to theRTO, the device may transition ownership responsibilities and be awarethat it can transition access rights in response to receiving the DATA(since the RTO indicates that there is no need to wait for an INV toinvalidate any shared copies). Thus, the data coherency transactionsdescribed above may be used in systems that support both BC and PTPmodes where requesting devices are not necessarily aware of which modetheir request is transmitted in.

FIG. 13C is a diagram depicting coherency activity in response to aread-to-own request when a device D3 has read access to and is thecurrent owner of the requested coherency unit (as indicated by thesubscript “O”) and other devices D2 have shared copies of the coherencyunit. As in FIGS. 13A and 13B, a requesting device D1 initiates an RTOtransaction by sending a read-to-own request on the address network 150.Since the RTO request is in PTP mode, the address network (e.g., theRequest Network) conveys the RTO request to the home memory subsystem M.Home memory subsystem M marks the requesting device D1 as the new ownerof the coherency unit and sends an RTO response (e.g., on the ResponseNetwork) to the prior owner, device D3, of the requested coherency unit.In response to the RTO response (which D3 may regard a “foreign”response since it is not part of a transaction initiated by device D3),device D3 supplies a copy of the coherency unit to device D1. Device D3loses its ownership responsibilities for the coherency unit in responseto receiving the RTO response and loses its access rights to thecoherency unit in response to sending the DATA packet to D1. Note thatD3 may receive other packets before sending the DATA packet to D1.

Since there are shared copies of the requested coherency unit, the homememory subsystem M sends an invalidating request INV to the sharingdevices D2 and requesting device D1 (e.g., on the Multicast Network).Devices D2 invalidate shared copies of the coherency unit upon receiptof INV. Home memory subsystem M also sends a WAIT response (e.g., on theResponse Network) to the requesting device D1. In response to receivingthe WAIT response, D1 gains ownership of the requested coherency unit.In response to receiving the DATA containing the coherency unit fromdevice D3 and the INV, device D1 gains write access to the coherencyunit.

FIG. 13D shows another exemplary RTO transaction. In this example, arequesting device D1 has read access to a coherency unit. Another deviceD2 has ownership of and read access to the coherency unit. In order togain write access, D1 initiates an RTO transaction for the coherencyunit by sending an RTO request on the address network. The addressnetwork conveys the RTO request to the home memory subsystem for thecoherency unit. The memory subsystem M sends an RTO response to theowning device D2. When there are non-owning active devices that haveshared access to a requested coherency unit, the memory subsystemnormally sends INV packets to the sharing devices. However, in thisexample, the only non-owning sharer D1 is also the requester. Sincethere is no need to invalidate D1's access right, the memory subsystemmay not send an INV packet to D1, thus reducing traffic on the addressnetwork. Accordingly, the memory subsystem M may return an RTO response(as opposed to a WAIT) to the requesting device D1. Upon receipt of theRTO response, D1 gains ownership of the requested coherency unit.Likewise, D2 loses ownership upon receipt of the RTO response. D1 gainswrite access to the requested coherency unit upon receipt of both theRTO response and the DATA packet from D2.

FIG. 13E illustrates a read-to-share (RTS) transaction. In this example,a requesting device D1 has neither an access right to nor ownership of aparticular coherency unit. One or more devices D2 have shared access tothe coherency unit, and a device D3 has ownership of and read access tothe coherency unit. Requesting device D1 initiates the RTS transactionby sending an RTS request upon the address network. Since the request isin PTP mode, the address network (e.g., the Request Network) conveys theRTS request to the home memory subsystem M for the requested coherencyunit. In response to the RTS request, home memory subsystem M sends anRTS response (e.g., on the Response Network) on the address network tothe owning device D3, which causes device D3 to provide the requestingdevice D1 with a copy of the requested coherency unit (DATA). Note thatif home memory subsystem M had been the owning device, it would havesent the requested coherency unit to the requesting device. Upon receiptof the requested coherency unit, device D1 gains a shared access rightto the coherency unit. The RTS transaction has no effect on the devicesD2 that have a shared access right to the coherency unit. Additionally,since device D1's ownership rights do not transition during a RTStransaction, device D1 does not receive a response on the addressnetwork (and thus in embodiments supporting both BC and PTP modes,receiving a local RTS when in BC mode may have no effect on theinitiating device). In a situation where there are no sharing devices D2and a device D3 has write access to the coherency unit, D3's sending acopy of the requested coherency unit to device D1 causes device D3 totransition its write access right to a read access right.

FIG. 13F shows an exemplary write stream (WS) transaction. In thisexample, device D2 has invalid access and no ownership of a particularcoherency unit. D1 has ownership of and write access to the coherencyunit. D2 initiates a WS transaction by sending a WS request on theaddress network. The address network conveys the request (e.g., on theRequest Network) to the home memory subsystem M. The home memorysubsystem M forwards the WS request (e.g., on the Response Network) tothe owning device D1 and marks itself as the owner of the coherencyunit. In response to receiving the WS request, the owning device D1loses its ownership of the coherency unit and sends an ACK packetrepresenting the coherency unit on the data network to the initiatingdevice D2. It is noted that D1 can receive additional address and/ordata packets before sending the ACK packet to device D2. D1 loses itswrite access to the coherency unit upon sending the ACK packet.

The home memory subsystem M also sends a WS response (e.g., on theResponse Network) to the requesting device. Note that the memory M mayinstead send an INV packet (e.g., on the Multicast Network) if anydevices have a shared access right to the coherency unit involved in theWS transaction. In response to receiving the ACK and the WS (or theINV), the requesting device D2 gains an A (All Write) access right tothe coherency unit. The home memory system also sends a PRN packet onthe data network to the initiating device D2. In response to the PRNpacket, the initiating device sends a data packet (DATA) containing thecoherency unit to the memory M. The initiating device loses the A accessright when it sends the data packet to memory M.

FIG. 13G illustrates a write-back (WB) transaction. In this example, theinitiating device D1 initially has ownership of and write access to acoherency unit. The device D1 initiates the WB transaction by sending aWB request on the address network (e.g., on the Request Network). Theaddress network conveys the request to the home memory subsystem M. Inresponse to the WB request, memory M marks itself as the owner of thecoherency unit and sends a WB response (e.g., on the Response Network)to the initiating device D1. Upon receipt of the WB response, initiatingdevice D1 loses ownership of the coherency unit. Memory M also sends aPRN packet (e.g., upon the data network) to device D1. In response tothe PRN, device D1 sends the coherency unit (DATA) to memory M on thedata network. Device D1 loses its access right to the coherency unitwhen it sends the DATA packet.

The above scenarios are intended to be exemplary only. Numerousalternatives for implementing a directory-based coherency protocol arepossible and are contemplated. For example, in the scenario of FIG. 13A,the data packet from memory M may serve to indicate no other validcopies remain within other devices D2. In alternative embodiments, whereordering within the network is not sufficiently strong, various forms ofacknowledgments (ACK) and other replies may be utilized to provideconfirmation that other copies have been invalidated. For example, eachdevice D2 receiving an invalidate packet (e.g., on the MulticastNetwork) may respond to the memory M with an ACK. Upon receiving allexpected ACKs, memory M may then convey an indication to initiatingdevice D1 indicating that no other valid copies remain within devicesD2. Alternatively, initiating device D1 may receive a reply count frommemory M or a device D2 indicating a number of replies to expect.Devices D2 may then convey ACKs directly to initiating device D1. Uponreceiving the expected number of replies, initiating device D1 maydetermine all other copies have been invalidated.

While the above examples assume that initiating devices are unaware ofwhether transactions are implemented in BC or PTP mode, initiatingdevices may control or be aware of whether transactions are implementedin PTP or BC mode in other embodiments. For example, each initiatingdevice may indicate which virtual network (e.g., Broadcast or Request)or mode a request should be sent in using a virtual network or mode IDencoded in the prefix of the request packet. In other embodiments, adevice may be aware of which mode a packet is transmitted in based onvirtual network or mode ID encoded (e.g., by the address network) in apacket prefix and may be configured to process packets differentlydepending on the mode. In such embodiments, a given packet may have adifferent effect when received as part of a BC mode transaction thanwhen received as part of a PTP mode transaction.

As with the BC mode transactions described above, it is contemplatedthat numerous variations of computer systems may be designed that employthe principle rules for changing access rights in active devices asdescribed above while in PTP mode. For example, other specifictransaction types may be supported, as desired, depending upon theimplementation.

It is also noted that variations with respect to the specific packettransfers described above for a given transaction type may also beimplemented. Additionally, while ownership transitions are performed inresponse to receipt of address packets in the embodiments describedabove, ownership transitions may be performed differently during certaincoherence transactions in other embodiments.

In addition, in accordance with the description above, an owning devicemay not send a corresponding data packet immediately in response toreceiving a packet (such as an RTO or RTS) corresponding to atransaction initiated by another device. Instead, the owning device maysend and/or receive additional packets before sending the correspondingdata packet. In one embodiment, a maximum time period (e.g., maximumnumber of clock cycles, etc.) may be used to limit the overall length oftime an active device may expend before sending a responsive datapacket.

Synchronized Networks Property

The Synchronized Networks Property identified above may be achievedusing various mechanisms. For example, the Synchronized NetworksProperty may be achieved by creating a globally synchronous systemrunning on a single clock, and tuning the paths in address network 150to guarantee that all address packets received by multiple devices(e.g., all multicast and broadcast address packets) arrive at allrecipient devices upon the same cycle. In such a system, address packetsmay be received without buffering them in queues. However, in someembodiments it may instead be desirable to allow for highercommunication speeds using source-synchronous signaling in which asource's clock is sent along with a particular packet. In suchimplementations, the cycle at which the packet will be received may notbe known in advance. In addition, it may further be desirable to providequeues for incoming address packets to allow devices to temporarilyreceive packets without flow controlling the address network 150.

In some embodiments, the Synchronized Networks Property may be satisfiedby implementing a Synchronized Multicasts Property. The SynchronizedMulticasts Property is based on the following definitions:

-   -   1) Logical Reception Time: Each client device receives exactly 0        or 1 multicast or broadcast packets at each logical reception        time. Logical reception time progresses sequentially (0, 1, 2,        3, . . . , n). Any multicast or broadcast arrives at the same        logical reception time at each client device that receives the        multicast or broadcast.    -   2) Reception Skew: Reception skew is the difference, in real        time, from when a first client device C1 is at logical reception        time X to when a second client device C2 is at logical reception        time X (e.g., the difference, in real time, from when C1        receives a particular multicast or broadcast packet to when C2        receives the same multicast or broadcast packet). Note that the        reception skew is a signed quantity. Accordingly, the reception        skew from C1 to C2 for a given logical reception time X may be        negative if C1 reaches logical reception time X after C2 reaches        logical reception time X.        The Synchronized Multicasts Property states that if a        point-to-point message M1 is sent from a device C1 to a device        C2, and if C1 sends M1 after logical reception time X at C1,        then M1 is received by C2 after logical reception time X at C2.

Details regarding one implementation of computer system 140 whichmaintains the Synchronized Multicasts Property (and thus theSynchronized Networks Property) without requiring a globally synchronoussystem and which allows address packets to be buffered is described inconjunction with FIG. 14. FIG. 14 is a block diagram illustratingdetails of one embodiment of each of the processing subsystems 142 ofcomputer system 140. Included in the embodiment of FIG. 14 are aprocessing unit 702, cache 710, and queues 720A-720D. Queues 720A-720Bare coupled to data network 152 via data links 730, and queues 720C-720Dare coupled to address network 150 via address links 740. Each of queues720 includes a plurality of entries each configured to store an addressor data packet. In this embodiment, a packet is “sent” by a subsystemwhen it is placed into the subsystem's address-out queue 720D ordata-out queue 720A. Similarly, a packet may be “received” by asubsystem when it is popped from the subsystem's data-in 720B oraddress-in queue 720C. Processing unit 702 is shown coupled to cache710. Cache 710 may be implemented using a hierarchical cache structure.

Processing unit 702 is configured to execute instructions and performoperations on data stored in memory subsystems 144. Cache 710 may beconfigured to store copies of instructions and/or data retrieved frommemory subsystems 144. In addition to storing copies of data and/orinstructions, cache 710 also includes state information 712 indicatingthe coherency state of a particular coherency unit within cache 710, asdiscussed above. In accordance with the foregoing, if processing unit702 attempts to read or write to a particular coherency unit and cachestate info 712 indicates processing unit 702 does not have adequateaccess rights to perform the desired operation, an address packet thatincludes a coherence request may be inserted in address out queue 720Dfor conveyance on address network 150. Subsequently, data correspondingto the coherency unit may be received via data-in queue 720B.

Processing subsystem 142 may receive coherency demands via address-inqueue 720C, such as those received as part of a read-to-own orread-to-share transaction initiated by another active device (orinitiated by itself). For example, if processing subsystem 142 receivesa packet corresponding to a read-to-own transaction initiated by aforeign device for a coherency unit, the corresponding coherency unitmay be returned via data-out queue 720A (e.g., if the coherency unit wasowned by the processing subsystem 142) and/or the state information 712for that coherency unit may be changed to invalid, as discussed above.Other packets corresponding to various coherence transactions and/ornon-cacheable transactions may similarly be received through address-inqueue 720C. Memory subsystems 144 and I/O subsystem 146 may beimplemented using similar queuing mechanisms.

The Synchronized Multicasts Property may be maintained by implementingaddress network 150 and data network 152 in accordance with certainnetwork conveyance properties and by controlling queues 720 according tocertain queue control properties. In particular, in, one implementationaddress network 150 and data network 152 are implemented such that themaximum arrival skew from when any multicast or broadcast packet(conveyed on address network 150) arrives at any first client device towhen the same multicast or broadcast packet arrives at any second,different client device is less than the minimum latency for any messagesent point-to-point (e.g., on the Response or Request virtual networksor on the data network 152) from the first client device to the secondclient device. Such an implementation results in a Network ConveyanceProperty (which is stated in terms of packet arrivals (i.e., whenpackets arrive at in queues 720B and 720C) rather than receptions (i.e.,when a packet affects ownership status and/or access rights in thereceiving device)). The Network Conveyance Property is based on thefollowing definitions:

-   -   1) Logical Arrival Time: Exactly 0 or 1 multicast or broadcast        packets arrive at each client device at each logical arrival        time. Logical arrival time progresses sequentially (0, 1, 2, 3,        . . . , n). Any multicast or broadcast is received at the same        logical arrival time by each client device that receives the        multicast or broadcast.    -   2) Arrival Skew: Arrival skew is the difference, in real time,        from when a first client device C1 is at logical arrival time X        to when a second client device C2 is at logical arrival time X        (e.g., the difference, in real time, from when a particular        multicast or broadcast packet arrives at C1 to when the same        multicast or broadcast packet arrives at C2). Note that the        arrival skew is a signed quantity. Accordingly, the arrival skew        from C1 to C2 for a given logical arrival time X may be negative        if C1 reaches logical arrival time X after C2 reaches logical        arrival time X.        The Network Conveyance Property states that if a point-to-point        packet M1 is sent from a client device C1 to a client device C2,        and if logical arrival time X occurs at C1 before C1 sends M1,        then logical arrival time X occurs at C2 before M1 arrives at        C2.

In addition to implementing address network 150 and data network 152such that the Network Conveyance Property holds, address-in queue 720Cand data-in queue 720B are controlled by a queue control circuit 760such that packets from the address and data networks are placed in therespective queue upon arrival and are removed (and thus received) in theorder they are placed in the queues (i.e., on a first-in, first-outbasis per queue). Furthermore, no data packet is removed from thedata-in queue 720B for processing until all address packets that arrivedearlier than the data packet have been removed from the address-in queue720C.

In one embodiment, queue control circuit 760 may be configured to storea pointer along with an address packet when it is stored in an entry atthe head of the address-in queue 720C. The pointer indicates the nextavailable entry in the data-in queue 720B (i.e., the entry that thedata-in queue 720C will use to store the next data packet to arrive). Insuch an embodiment, address packets are received (i.e., they affect theaccess rights of corresponding coherency units in cache 710) after beingpopped from the head of address-in queue 720C. Queue control circuit 760may be configured to prevent a particular data packet from beingreceived (i.e., processed by cache 710 in such a way that access rightsare affected) until the pointer corresponding to the address packet atthe head of the address-in queue 720C points to an entry of data-inqueue 720B that is subsequent to the entry including the particular datapacket. In this manner, no data packet is removed from the data-in queue720B for processing until all address packets that arrived earlier thanthe data packet have been removed from the address-in queue 720C.

In an alternative embodiment, queue control circuit 760 may beconfigured to place a token in the address-in queue 720C whenever apacket is placed in the data-in queue 720B. In such an embodiment, queuecontrol 760 may prevent a packet from being removed from the data-inqueue 720B until its matching token has been removed from the address-inqueue 720C. It is noted that various other specific implementations ofqueue control circuit 760 to control the processing of packetsassociated with queues 720 are contemplated.

By controlling address-in queue 720C and data-in queue 720B in thismanner and by implementing address network 150 and data network 152 inaccordance with the Network Conveyance Property discussed above,computer system 140 may maintain the Synchronized Multicasts Property.

In alternative embodiments, the Synchronized Multicasts Property may besatisfied using timestamps. For example, timestamps may be conveyed withdata and/or address packets. Each device may inhibit receipt of aparticular packet based on that packet's timestamp such that theSynchronized Multicasts Property holds.

Turning next to FIG. 15, further details regarding an embodiment of eachof the processing subsystems 142 of FIG. 1 are shown. Circuit portionsthat correspond to those of FIG. 14 are numbered identically.

FIG. 15 depicts an interface controller 900 coupled to processing unit702, cache 710, and data and address queues 720. Interface controller900 is provided to control functionality associated with the interfacingof processing subsystem 142 to other client devices through addressnetwork 150 and data network 152. More particularly, interfacecontroller 900 is configured to process various requests initiated byprocessing unit 702 that require external communications (e.g., packettransmissions) to other client devices, such as load and store requeststhat initiate read-to-share and read-to-own transactions. Interfacecontroller 900 is also configured to process communicationscorresponding to transactions initiated by other client devices. In oneparticular implementation, interface controller 900 includesfunctionality to process transactions in accordance with the foregoingdescription, including that associated with the processing of thecoherence operations as illustrated in FIGS. 12A-12F and FIGS. 13A-13G.For this purpose, functionality depicted as transitory state controller902 is provided within interface controller 900 for processingoutstanding local transactions (that is, transactions initiated byprocessing subsystem 142 that have not reached a stable completedstate). To support this operation, information relating to theprocessing of coherence operations (including state information) may bepassed between interface controller 902 and cache 710. Transitory statecontroller 902 may include multiple independent state machines (notshown), each of which may be configured to process a single outstandinglocal transaction until completion.

The functionality depicted by transitory state controller 902 may beconfigured to maintain various transitory states associated withoutstanding transactions, depending upon the implementation and thetypes of transactions that may be supported by the system. For example,from the exemplary transaction illustrated in FIG. 12B, device D2 entersa transitory state IO (Invalid, Owned) after receiving its own RTO andprior to receiving a corresponding data packet from device D1.Similarly, device D1 enters transitory state WN (Write, Not Owned) inresponse to receiving the RTO from device D2. D1's transitory state ismaintained until the corresponding data packet is sent to device D2. Inone embodiment, transitory state controller 902 maintains suchtransitory states for pending local transactions to thereby control theprocessing of address and data packets according to the coherenceprotocol until such local transactions have completed to a stable state.

Referring back to FIG. 10C, it is noted that states WO, RO, RN, and INare equivalent to corresponding states defined by the well-known MOSIcoherence protocol. These four states, in addition to state WN, arestable states. The other states depicted in FIG. 10C are transient andonly exist during the processing of a local transaction by interfacecontroller 900. Local transactions are transactions that were initiatedby the local active device. In addition, in one embodiment, the state WNmay not be maintained for coherency units that do not have a localtransaction pending since it may be possible to immediately downgradefrom state WN to state RN for such coherency units. As a result, in oneparticular implementation, only two bits of state information aremaintained for each coherency unit within state information storage 712of cache 710. Encodings for the two bits are provided that correspond tostates WO, RO, RN, and IN. In such an embodiment, transitory stateinformation corresponding to pending local transactions may beseparately maintained by transitory state controller 902.

Various additional transitory states may also result when a coherencetransaction is initiated by an active device while a coherencetransaction to the same coherency unit is pending within another activedevice. For example, FIG. 16 illustrates a situation in which an activedevice D1 has a W access right and ownership for a particular coherencyunit, and an active device D2 initiates an RTO transaction in order toobtain a W access right to the coherency unit. When D1 receives the RTOpacket through address network 150 (e.g., on the Broadcast Network in BCmode or on the Response Network in PTP mode), D1 changes its ownershipstatus to N (Not Owned). D2 changes its ownership status to O (Owned)when it receives its own RTO through address network 150 (e.g., on theBroadcast Network in BC mode or on the Response Network in PTP mode).Another active device D3 may subsequently issue another RTO to the samecoherency unit that is received by D2 through address network 150 beforea corresponding data packet is received at D2 from D1. In thissituation, D2 may change its ownership status to N (Not Owned) when thesecond RTO is received. In addition, when D3 receives its own RTOthrough address network 150, its ownership status changes to O (Owned).When a corresponding data packet is received by D2 from D1, D2's accessright changes to a write access right. D2 may exercise this write accessright repeatedly, as desired. At some later time, a corresponding datapacket may be sent from D2 to D3. When the data is received by D3, itacquires a W access right. Such operations and transitory statetransitions may be performed and maintained by the functionalitydepicted by transitory state controller 902, as needed, based upon thetypes of transactions that may be supported and the particular sequenceof packet transmissions and receptions that may occur, as well as uponthe particular coherence methodology that may be chosen for a givenimplementation.

FIGS. 15A-15D show various specific cache states that may be implementedin one embodiment of an active device. Note that other embodiments maybe implemented differently than the one shown in FIGS. 15A-15D. FIG. 15Ashows various cache states and their descriptions. Each cache state isidentified by two capital letters (e.g., WO) identifying the currentaccess right (e.g., “W”=write access) and ownership responsibility(e.g., “O”=ownership). Transitory states are further identified by oneor more lowercase letters. In transitory states, an active device may bewaiting for receipt of one or more address and/or data packets in orderto complete a local transaction (i.e., a transaction initiated by thatdevice). Note that transitory states may also occur during foreigntransactions (i.e., transactions initiated by other devices) in someembodiments.

FIGS. 15B-15D also illustrate how the various cache states implementedin one embodiment may change in response to events such as sending andreceiving packets and describe events that may take place in these cachestates. Note that, with respect to FIGS. 15A-15D, when a particularpacket is described as being sent or received, the description refers tothe logical sending or receiving of such a packet, regardless of whetherthat packet is combined with another logical packet. For example, a DATApacket is considered to be sent or received if a DATA or DATAP packet issent or received. Similarly, an ACK packet is considered to be sent orreceived if an ACK or PRACK packet is sent or received, and a PRN packetis considered to be sent or received if a PRN, DATAP, or PRACK packet issent or received.

State transitions and actions that may take place in response to variousevents that occur during local transactions are illustrated in FIG. 15C.FIG. 15D similarly illustrates state transitions and actions that maytake place in response to various events that occur during foreigntransactions. In the illustrated embodiment, certain events are notallowed in certain states. These events are referred to as illegalevents and are shown as darkened entries in the tables of FIGS. 15C-15D.In response to certain states occurring for a particular cache line, anactive device may perform one or more actions involving that cache line.Actions are abbreviated in FIGS. 15C-15D as one or more alphabeticaction codes. FIG. 15B explains the actions represented by each of theaction codes shown in FIGS. 15C-15D. In FIGS. 15C-15D, each value entrymay include an action code (e or c) followed by a “/”, a next state (ifany), an additional “/”, and one or more other action codes (a, d, i, j,n, r, s, w, y, or z) (note that one or more of the foregoing entry itemsmay be omitted in any given entry).

As illustrated, the interface controller 900 depicted in FIG. 15 mayfurther include a promise array 904. As described above, in response toa coherence request, a processing subsystem that owns a coherency unitmay be required to forward data for the coherency unit to anotherdevice. However, the processing subsystem that owns the coherency unitmay not have the corresponding data when the coherence request isreceived. Promise array 904 is configured to store informationidentifying data packets that must be conveyed to other devices on datanetwork 152 in response to pending coherence transactions as dictated bythe coherence protocol.

Promise array 904 may be implemented using various storage structures.For example, promise array 904 may be implemented using a fully sizedarray that is large enough to store information corresponding to alloutstanding transactions for which data packets must be conveyed. In oneparticular implementation, each active device in the system can have atmost one outstanding transaction per coherency unit. In this manner, themaximum number of data packets that may need to be forwarded to otherdevices may be bound, and the overall size of the promise array may bechosen to allow for the maximum number of data promises. In alternativeconfigurations, address transactions may be flow-controlled in the eventpromise array 904 becomes full and is unable to store additionalinformation corresponding to additional data promises. Promise array 904may include a plurality of entries, each configured to store informationthat identifies a particular data packet that needs to be forwarded, aswell as information identifying the destination to which the data packetmust be forwarded. In one particular implementation, promise array 904may be implemented using a linked list.

Turning next to FIG. 17, it is noted that systems that employ generalaspects of the coherence protocols described above could potentiallyexperience a starvation problem. More particularly, as illustrated, anactive device D1 may request a read-only copy of a coherency unit toperform a load operation by conveying a read-to-share (RTS) packet uponaddress network 150. However, as stated previously, a corresponding datapacket may not be conveyed to D1 from D2 (i.e., the owning device) untilsome time later. Prior to receiving the corresponding data packet,device D1 has the coherency unit in an I (Invalid) state. Prior toreceiving the corresponding data packet, a device D3 may initiate an RTO(or other invalidating transaction) that is received by D1 ahead of thecorresponding data packet. This situation may prevent device D1 fromgaining the read access right to the coherency unit since the previouslyreceived RTO may nullify the effect of the first request. Althoughdevice D1 may issue another RTS to again attempt to satisfy the load,additional read-to-own operations may again be initiated by other activedevices that continue to prevent device D1 from gaining the necessaryaccess right. Potentially, requests for shared access to a coherencyunit could be nullified an unbounded number of times by requests forexclusive access to the coherency unit, thus causing starvation.

Such a starvation situation can be avoided by defining certain loads ascritical loads. Generally speaking, a critical load refers to a loadoperation initiated by an active device that can be logically reorderedin the global order without violating program order. In one embodimentthat implements a TSO (Total Store Order) memory model, a load operationis a critical load if it is the oldest uncommitted load operationinitiated by processing unit 702. To avoid starvation, in response to anindication that an outstanding RTS corresponds to a critical load andreceipt of a packet that is part of an intervening foreign RTOtransaction to the same coherency unit (before a corresponding datapacket for the RTS is received) transitory state controller 902 may beconfigured to provide a T (Transient-Read) access right to the coherencyunit upon receipt of the data packet. The T access right allows the loadto be satisfied when the data packet is received. After the load issatisfied, the state of the coherency unit is downgraded to I (Invalid).This mechanism allows critical loads to be logically reordered in theglobal order without violating program order. The load can be viewed ashaving logically occurred at some point right after the owner (deviceD2) sends a first packet to D1 (or to device D3) but before the deviceperforming the RTO (device D3) receives its corresponding data packet.In this manner, the value provided to satisfy the load in device D1includes the values of all writes prior to this time and none of thevalues of writes following this time.

In one particular implementation, processing unit 702 may provide anindication that a load is the oldest uncommitted load when the loadrequest is conveyed to interface controller 900. In another embodiment,a load may be indicated as being a critical load if it is the oldestuncommitted load at the time the local RTS is conveyed on addressnetwork 150. In still a further embodiment, a load may be indicated asbeing a critical load if it is the oldest uncommitted load at the timethe foreign invalidating RTO is received.

It is noted that, in the scenario described in conjunction with FIG. 17,if the RTS is not indicated as being associated with a critical load,transitory state controller 902 may maintain the coherency unit in the I(Invalid) state (rather than assigning the T state) in response toreceiving the corresponding data.

It is also noted that in systems that implement other memory models, aload operation may be a critical load (i.e., a load operation that canbe logically reordered in the global order) when other conditions exist.For example, in a system that implements sequential consistency, a loadoperation may be defined as a critical load if there are no olderuncommitted load or store operations.

In addition, it is noted that in other embodiments all or part of memorysubsystems 144 may be integrated (e.g., in the same integrated circuit)with the functionality of processing subsystems 142, as depicted in FIG.18. For example, in one embodiment, a memory controller included in thememory subsystem 144 may be included in the same integrated circuit asthe processing subsystem. The integrated memory controller/processingsubsystem may be coupled to external memory storage 225 also included inthe memory subsystem 144. In embodiments like these, the conveyance ofcertain packets on the address and/or data networks as discussed abovefor particular coherence transactions may not be necessary. Instead,information indicative of the desired transaction may be passed directlybetween the integrated memory and processing subsystems.

Multi-level Address Switches

In some embodiments of computer system 140, multiple levels of addressswitches may be used to implement address network 150, as shown in FIG.19. In this embodiment, there are two levels of address switches. Firstlevel address switch 2004 communicates packets between the second leveladdress switches 2002A and 2002B. In the illustrated embodiment, thesecond level address switches (collectively referred to as addressswitches 2002) communicate packets directly with a unique set of clientdevices. However, in other embodiments, the sets of client devices thateach second level address switch communicates with may not be unique. Insome embodiments, a rootless address network (i.e., an address networkin which there is not a common address switch through which allmulticast and broadcast address packets are routed) may be implemented.

In one embodiment, the address network 150 may be configured to conveyan address packet from processing subsystem 142A to memory subsystem144B in PTP mode. The address packet may first be conveyed fromprocessing system 142A to address switch 2002A. Address switch 2002A maydetermine that the destination of the address packet is not one of theclient devices that it communicates with and communicate the packet tofirst stage address switch 2004. The first level address switch 2004routes the packet to address switch 2002B, which then conveys the packetto memory subsystem 144B.

Address network 150 may also be configured to convey address packets inBC mode in some embodiments. An address packet being conveyed in BC modefrom processing subsystem 142A may be received by address switch 2002Aand conveyed to address switch 2004. In one embodiment, address switch2002A may access a mode table to determine whether to transmit thepacket in BC or PTP mode and encode a mode (or virtual network)indication in the packet's prefix to indicate which mode it should betransmitted in. Address switch 2004 may then broadcast the packet toboth second level address switches 2002. Thus, address switches at thesame level receive the multicast or broadcast packet at the same time.In turn, address switches 2002 broadcast the packet to all of thedevices with which they communicate. In embodiments supporting differentvirtual networks, invalidating packets sent on the Multicast Network maybe similarly broadcast to all of the higher-level address switches(e.g., broadcast by first-level address switch 2004 to second-leveladdress switches 2002). The highest-level address switches (second-leveladdress switches 2002 in the illustrated embodiment) may then multicastthe multicast packet to the appropriate destination devices. In order tosatisfy the various ordering properties, all of the highest-levelswitches may arbitrate between address packets in the same manner. Forexample, in one embodiment, address switches may prioritize broadcastsand/or multicasts ahead of other address packets. In some embodiments,address switches may prioritize broadcasts and multicasts ahead of otheraddress packets during certain arbitration cycles and allow onlynon-broadcast and non-multicast address packets to progress during theremaining arbitration cycles in order to avoid deadlock. Note that otherembodiments may implement multiple levels of address switches in adifferent manner.

Multi-Node Systems

Referring back to FIG. 1, computer system 140 may be described as a node140. In general, a node is a group of client devices that share the sameaddress and data networks. A computer system may include multiple nodes.For example, in some embodiments, there may be limitations on how manyclient devices can be present in each node. By linking multiple nodes,the number of client devices in the computer system may be adjustedindependently of the size limitations of any individual node.

FIG. 20 shows one embodiment of a multi-node computer system 100. In theillustrated embodiment, three nodes 140A-140C (collectively referred toas nodes 140) are coupled to form multi-node computer system 100. Eachnode includes several client devices. For example, node 140A includesprocessing subsystems 142AA and 142BA, memory subsystems 144AA and144BA, I/O subsystem 146A, and interface 148A. The client devices innode 140A share address network 150A and data network 152A. In theillustrated embodiment, nodes 140B and 140C contain similar clientdevices (identified by reference identifiers ending in “B” and “C”respectively). Note that different nodes may include different numbersof and/or types of client devices, and that some types of client devicesmay not be included in some nodes.

Within each node 140, client devices share the same address and datanetworks. In some embodiments, the address networks within some of thenodes may be configured to operate in both BC mode and PTP mode (e.g.,depending on the address of a requested coherency unit). For example, anode may include a mode table that indicates the transmission mode (BCor PTP) for each coherency unit or, alternatively, for each page orblock of data. BC and PTP mode may be determined on a per-node (asopposed to a per-unit of data) basis in some nodes. In some embodiments,address packets that are part of a transaction involving a particularcoherency unit may be conveyed in PTP mode in one node and in BC mode inanother node. In other embodiments, all of the address networks in allof the nodes may operate in the same mode for all coherency units.Whether address packets specifying a given coherency unit are conveyedin PTP or BC mode may be determined either statically or dynamicallywithin each node, as discussed above.

Each node 140 communicates with other nodes in computer system 100 viaan interface 148 (interfaces 148A-148C are collectively referred to asinterfaces 148). Some nodes may include more than one interface.Interfaces 148 send coherency messages to each other over an inter-nodenetwork 154. In one embodiment, inter-node network 154 may operate inPTP mode. Interfaces 148 may communicate by sending packets of addressand/or data information on inter-node network 154. In order to avoidconfusion between inter-node and intra-node communications, interfaces148 are described herein as “sending coherency messages to” otherinterfaces and “sending packets to” client devices within the same nodeas the sending interface.

Address network 150, data network 152, and inter-node network 154 may beconfigured to satisfy the Synchronized Networks Property describedabove. The orders defined above may be adapted to account for interfaces148 and the inter-node network 154 as follows:

-   -   1) Local Order (<_(l)): Event X precedes event Y in local order,        denoted X<_(l) Y, if X and Y are events (including the sending        or reception of a packet or coherency message on the address,        data, or inter-node network, a read or write of a coherency        unit, or a local change of access rights) which occur at the        same client device C and X occurs before Y.    -   2) Message Order (<_(m)): Event X precedes event Y in message        order, denoted X<_(m) Y, if X is the sending of a packet or        coherency message M on the address, data, or inter-node network        and Y is the reception of the same packet or coherency message        M.    -   3) Invalidation Order (<_(i)): Event X precedes event Y in        invalidation order, denoted X<_(i) Y, if X is the reception of a        broadcast or multicast packet or coherency message M at a client        device C1 and Y is the reception of the same packet or coherency        message M at a client C2, where C1 does not equal C2, and where        either C2 is the initiator of the packet M and C1 is not an        interface or C1 is the initiator of the coherency message M and        C2 is an interface.        Using the orders defined above, the Synchronized Networks        Property holds that:    -   1) The union of the local order <_(l), the message order <_(m),        and the invalidation order <_(i) is acyclic.

Each node 140 may occupy its own physical enclosure. In someembodiments, however, one or more nodes may share the same enclosure.

Client devices within multi-node computer system 100 may share a commonphysical address space. The cache coherence protocol described above maybe used to maintain cache coherence in multi-node computer system 100.The interfaces 148 may communicate between nodes 140 in order tomaintain cache coherency between nodes.

Within each node 140, each coherency unit may map to a unique memorysubsystem 144 (or to no memory subsystem at all). As described above, amemory subsystem 144 within a node 140 that maps a given coherency unitis the home memory subsystem for that coherency unit within that node.If only one node 140 within the computer system 100 contains a memorysubsystem 144 that maps a given coherency unit, that node is the homenode for that coherency unit.

In some embodiments, more than one node 140 may contain a memorysubsystem 144 that maps a given coherency unit. All of the nodes thatmap a particular coherency unit are described herein as LPA (LocalPhysical Address) nodes for that coherency unit. The home node for agiven coherency unit will be an LPA node for that coherency unit. Ifthere is more than one LPA node for a given coherency unit, a unique LPAnode may be designated the home node for that coherency unit. Generally,a node 140 is an LPA node for a given coherency unit if a memory 144 orI/O device 146 within that node maps the coherency unit. Likewise, acoherency unit is an LPA coherency unit for a given node if a memory orI/O device in that node maps the coherency unit.

Active devices in a multi-node computer system 100 may be able to accessall of the addresses in the common physical address space. For example,an active device in a node 140A may request a readable and/or writablecopy of a non-LPA coherency unit (i.e., a coherency unit that is notmapped by a memory subsystem or an I/O device within the node containingthe requesting device). In order to provide the active device with therequested data, an interface 148A in the active device's node sends acoherency message indicative of the request to the home node 140B forthe requested coherency unit. In response, the home node 140B mayinitiate a subtransaction within the home node 140B and/or sendadditional coherency messages on the inter-node network 154 to othernodes 140C in order to satisfy the request. As described above, atransaction includes the data and address packets that implement datatransfers and ownership and access transitions within each node.Additionally, a transaction performed in a multi-node system 100 mayalso include coherency messages sent between interfaces on inter-nodenetwork 154. Within a transaction that involves multiple nodes of amulti-node system 100, the data and address packets sent in a singlenode are referred to as subtransactions.

A global access state may be defined for each coherency unit within eachnode 140. The global access state defines the access rights associatedwith a particular coherency unit within a particular node. For example,in some embodiments, the global access states may be Shared (maximumaccess right=read access), Invalid (maximum access right=invalidaccess), and Modified (maximum access right=write access). If acoherency unit is in the Modified global access state in a particularnode, one of the devices within that node may have a write access rightto that coherency unit. If the coherency unit is in the Shared globalaccess state in the node, a client device in that node may have, atmost, a read access right to that coherency unit. Note that in such anembodiment, the global access state identifies the maximum access rightcurrently allowed within a node (as opposed to the access rightcurrently held by any particular device within the node). Thus, theremay not necessarily be a device with write access to a coherency unit ina node that has that coherency unit in the Modified global access state.However, no device within a node can have an access right to a coherencyunit that is greater than the global access state for that coherencyunit within the node. For example, if a coherency unit is in the Invalidglobal access state in a given node, no client device in that node canhave a valid copy of the coherency unit. The global access state isassociated with all of the devices (as opposed to a single device)within a node. Access rights to a coherency unit may be traded betweendevices in the node without affecting the global access state. Forexample, a first active device 142AA in the node 140A may lose writeaccess as part of an RTO transaction that provides a second activedevice 142BA in the node with write access, and the global access stateof the coherency unit within the node 140A will remain Modified. Theglobal access state may change in response to transactions that involvecommunicating with other node(s).

The global access states may be used to determine what actions need tobe taken in each node to satisfy a coherency transaction for a givencoherency unit. For example, if a RTO transaction is initiated, anyvalid shared copies of the coherency unit should be invalidated as partof the RTO transaction. Nodes that may contain devices with sharedaccess to the coherency unit will have the coherence unit in the Sharedglobal access state, and thus those nodes should invalidate (e.g., bysending INV-type packets on the Multicast or Broadcast address network)copies of the coherency unit as part of the RTO. In contrast, nodes thathave the coherency unit in the Invalid global access state do not needto invalidate any copies, since their global access state indicates thatthere are no devices with shared access rights to the coherency units inthose nodes.

In addition to indicating the maximum access rights allowed for anydevice within a particular node for a particular coherency unit, theglobal access state indication may also indicate which node isresponsible for providing data corresponding to the coherency unit. Whena coherency unit is in a static state (also referred to as a staticcoherency unit), the node with the coherency unit in the Modified globalaccess state (if any) is the node that is responsible for providing datacorresponding to the coherency unit to satisfy certain transactions(e.g., RTS, RTO, WS, RTWB, etc.). The static state is defined asoccurring when no packets have been sent but not received on the addressor inter-node networks for the coherency unit, all pending transactions(if any) involving the coherency unit are waiting for interface action,and the coherency unit is not being processed by the interface in thecoherency unit's home node (e.g., the coherency unit is not currentlylocked in the home node, as will be described in more detail below). Ifno node has the coherency unit in the Modified global access state, thehome node may be responsible for providing data corresponding to thecoherency unit in order to satisfy certain transactions.

In some embodiments, a coherency unit's home memory subsystem 144 withinan LPA node 140 may track the global access state of that coherency unitwithin the node 140. In one embodiment, a home memory subsystem 144 maymaintain an indication of the global access state (within that node) ofeach coherency unit that maps to that memory subsystem. For example, inone embodiment, a home memory subsystem may maintain gTags (Global Tags)(e.g., in a directory 220 or in a directory-like structure in memory225) indicating the global access state of each coherency unit that mapsto that memory subsystem. The home memory subsystem 144 or an interface148 within the node 140 may also track which node (e.g., using a valuethat identifies a unique node within computer system 100) is theModified node (if any) for a given coherency unit as part of thatcoherency unit's global information. FIG. 21 shows an exemplary set ofvalues for a coherency unit's gTag: gS (Shared), gI (Invalid), and gM(Modified).

Note that each node may not maintain a gTag for each coherency unit. Forexample, nodes may not maintain gTags for non-home and/or non-LPAcoherency units in some embodiments. However, a global access state isstill defined for each coherency unit within each node, even if nodevice within that node actually maintains the global access state. Notethat other global access states may also be maintained instead of and/orin addition to the gTag states defined above.

The gTag associated with a particular coherency unit within a node maytransition at a different time than an individual device's access rightsand/or ownership responsibility associated with that particularcoherency unit transition. For example, the gTag associated with acoherency unit within a node 140 may transition in response to a memorysubsystem 144's receipt of an address packet sent from an interface 148.In contrast, an active device's ownership responsibilities maytransition upon receipt of address packets received from other clientdevices as well as upon receipt of address packets from an interface148.

FIG. 22 shows an exemplary set of address packets that may be sentand/or received by one embodiment of an interface 148 in order toimplement a subtransaction as part of a transaction initiated in anothernode. In the illustrated embodiment, packets sent by an interface 148 aspart of a subtransaction are referred to as proxy packets. In someembodiments, receipt of certain proxy packets may have different effectsthan receipt of non-proxy packets that relate to the same type oftransaction.

A PRTSM (Proxy Read-To-Share Modified) packet is a request from aninterface in a gM node (i.e., a node that has the requested coherencyunit in a Modified global access state) that is sent to initiate asubtransaction for an RTS transaction initiated in another node.Similarly, a PRTOM (Proxy Read-To-Own Modified) packet is a request froman interface in a gM node that initiates a subtransaction in response toan RTO request sent in another node. A PRTO (Proxy RTO) packet may beused to initiate a similar subtransaction in a non-gM node. While theembodiment illustrated in FIG. 22 uses different types of packets for gMand non-gM nodes, other embodiments may use the same type of packets inall nodes.

A PU (Proxy Upgrade) packet is a request sent by an interface requestingthat a memory subsystem supply data for an outstanding RTO transaction.A PDU (Proxy Data Upgrade) packet is a request sent by an interfacerequesting that a memory subsystem update a gTag (e.g., from gI to gM).A PDU may be used to indicate that the sending interface will besupplying data for an outstanding RTO.

A PRSM (Proxy Read-Stream Modified) packet is a request from aninterface in a gM node to initiate a subtransaction in response to an RSrequest in another node. A PIM (Proxy Invalidate Modified) is aninvalidating request (e.g. sent in response to a remote WS) from aninterface in a gM node to initiate a subtransaction that invalidates acoherency unit in caches and/or memory within the gM node. Upon receiptof a PIM, an owning device may respond with a data packet (e.g., an ACK)corresponding to the requested coherency unit. A PI (Proxy Invalidate)is a similar invalidating request used to invalidate data in cachesand/or memory in a gI or gS node.

An interface 148 may use additional packets to update and/or read globalaccess states maintained in a memory subsystem. A PMR (Proxy MemoryRead) request is a request from an interface to read a gTag or otherglobal information (e.g., the node ID of the gM node) for a particularcoherency unit. A PMR request may also request a copy of the specifiedcoherency unit from memory. A PMW (Proxy Memory Write) request is arequest from an interface to write a gTag or other global informationfor a particular coherency unit. For example, an interface may send aPMW packet, the memory may respond with a PRN data packet, and theinterface may send a DATAM packet (described below) containing a newgTag value or other global information.

FIG. 23 shows exemplary data packets that may be sent and/or received byan interface 148 in one embodiment of a multi-node computer system 100.In this example, a DATAM packet may contain global information (e.g.,information identifying a node that contains an owning active deviceand/or a gTag value) and/or a copy of a coherency unit. A DATAN packetis sent from a memory subsystem to an interface to indicate that no PRNwill be coming in response to a PRTSM. Interfaces 148 may also send andreceive DATA packets like those described above.

In some embodiments, interfaces 148 may ignore address packetsspecifying LPA coherency units unless received in a special format. Thismay allow transactions that do not require coherency messages to othernodes to complete locally within a node without taking up resourceswithin the interface and the inter-node network. However, in some cases(e.g., an RTO transaction initiated by an active device within a gS nodefor an LPA coherency unit), coherency messages to other nodes (e.g., toinvalidate shared copies in other nodes) may be needed in order tocomplete a transaction for an LPA coherency unit. In those situations, ahome memory subsystem may send a REP (Report) packet to an interface.The REP packet identifies the transaction involving the LPA coherencyunit and indicates that the interface's intervention is needed tocomplete the transaction. Receipt of a REP packet may cause an interfaceto send coherency messages to interfaces in other nodes and/or toinitiate one or more subtransactions.

FIG. 24 shows how the exemplary proxy address packets for a particularcoherency unit may be used to update that coherency unit's global accessstate in memory. For example, if the current global access state of aparticular coherency unit is gM (Modified) and the home memory subsystemfor that coherency unit receives a PRTSM specifying that coherency unit,the memory subsystem may update the global access state of the coherencyunit to gS (Shared). If instead a PRTOM is received, the new globalaccess state of the coherency unit may become gI (Invalid). A PU packetmay be received in a gS node and cause the specified coherency unit'sgTag to become gM. A PDU packet may be received in a gM, gS, or gI nodeand cause the new gTag of the specified coherency unit to become gM.PRSM and PIM packets may be received in gM nodes. A PRSM packet has noeffect on the specified coherency unit's gTag. A PIM packet causes thegTag to become gI. PMR packets have no effect on gTags. PMW packets maybe used by an interface 148 to specify the new value of a coherencyunit's gTag to a memory subsystem. PMW packets may be received in anyglobal access state and may set the specified coherency unit's gTag toany valid global access state.

Note that the above packet types are merely exemplary. While someembodiments may use all or some of the data and address packetsdescribed above, other embodiments may use other packet types instead ofor in addition to those described above.

FIG. 25 shows an example of an RTO transaction in an embodiment ofmulti-node system 100. Two nodes are shown: a home node 140H and arequesting node 140R (note that other nodes may also be present in thesystem). Requesting node 140R contains an active device D1 that isinitiating an RTO transaction for a coherency unit (D1 currently has aninvalid access right (“I”) to and no ownership (“N”) of the coherencyunit, as indicated by the subscript “IN”). Home node 140H is the homenode for the coherency unit requested by active device D1. In thisexample, address and data packets like those shown in FIGS. 7-9 and23-24 may be used to implement coherence transactions andsubtransactions within each node.

Active device D1's RTO request may be conveyed by the address network inrequesting node 140R in either BC or PTP mode (e.g., as indicated by amode table within that node) in some embodiments. In one embodiment of amulti-node system, if the requesting node 140R is not an LPA node forthe requested coherency unit, the request may be conveyed in BC mode.The interface 148R within the requesting node 140R may receive the RTOrequest and send a coherency message indicative of the RTO request tothe home node 140H for the requested coherency unit. In response toreceiving the remote RTO request (here, “remote” is used to describe acoherency message or packet sent as part of a transaction that wasinitiated in another node), the interface 148H in the home node 140H mayinitiate one or more subtransactions and/or send coherency messages toother interfaces in order to provide the requesting node 140R with therequested coherency unit.

If requesting node 140R is an LPA node for the requested coherency unit,the RTO request may be conveyed in PTP mode. The address network mayconvey the RTO request to a memory subsystem that maps the requestedcoherency unit. In response to an indication that satisfying the requestmay involve sending coherency messages to the home node (e.g., if thecoherency unit is gS or gI in requesting node 140R) the memory subsystemmay send the request to the interface 148R (e.g., as a REP packet) onthe data network. In response to the RTO request, interface 148R sends aHome RTO coherency message indicative of the request to interface 148Hin home node 140H.

When the home interface 148H in home node 140H begins handling the RTOtransaction initiated in the requesting node 140R in response to theHome RTO coherency message, the home interface 148H may acquire a lockon the requested coherency unit in order to prevent other transactionsinvolving the coherency unit from being handled until the RTO hascompleted. In this example, the home node 140H has the requestedcoherency unit in the gM (Modified) state, indicating that one of theclient devices in the home node may have write (or read) access to thecoherency unit. Interface 148H may maintain the gTag for the coherencyunit in one embodiment. In the illustrated embodiment, however, the homememory subsystem M maintains the gTag for the requested coherency unit.Thus, interface 148H may query the home memory subsystem M for the gTagof the coherency unit (e.g., using a PMR packet, not shown). The memorymay send a response (e.g., a DATAM packet, not shown) indicating thegTag. Based on the gTag within the home node, interface 148H mayinitiate a subtransaction within the home node and/or send coherencymessages to one or more other nodes. Here, gM implies (in static state)that a device within the home node has an ownership responsibility forthe requested coherency unit. In this embodiment, gM also indicates thatno other devices in any other node have access to the coherency unit(i.e., no other nodes are gM or gS for the coherency unit).

In the illustrated example, the home interface 148H sends a PRTOM (ProxyRTO Modified) request in response to the home node being a gM node forthe requested coherency unit. Sending the PRTOM packet initiates a PRTOMsubtransaction. The PRTOM subtransaction provides the home interface148H with a copy of the requested coherency unit, ends D2's ownership ofthe coherency unit, and invalidates access to copies of the coherencyunit within the home node 140H. In this example, the PRTOM request isconveyed to the home memory subsystem M by the address network in PTPmode. In response to receiving the PRTOM, the home memory subsystem Msends a PRTOM response to the owning device D2 (e.g., based on directoryinformation identifying owning device D2 as the owner of the coherencyunit identified in the PRTOM). The home memory subsystem M also sends aninvalidating request (INV) to device(s) D3 that have shared access tothe requested coherency unit and to the home interface 148H.Additionally, memory M sends interface 148H a WAIT packet indicatingthat shared copies should be invalidated before write access to thecoherency unit is proper. Note that in other embodiments, the PRTOM maybe conveyed in BC mode.

In response to receipt of the PRTOM from interface 148H, memorysubsystem M may update its gTag for the requested coherency unit to gI,since completion of the remote RTO will result in home node 140H havingthe requested coherency unit in the Invalid global access state. Homememory subsystem M may also update its global information to identifythe requesting node 140R as the new gM node for the coherency unit. Theinterface 148H may, in some embodiments, encode the node ID of therequesting node 140R in the PRTOM packet so the memory subsystem M canupdate the global information identifying the gM node for the requestedcoherency unit.

Similarly to an RTO transaction in a single-node system, receipt of thePRTOM response causes owning device D2 to lose ownership of thecoherency unit. D2 also sends a copy of the coherency unit to interface148H in response to receiving the PRTOM packet. Upon sending thecoherency unit, D2 loses access to the coherency unit. Receipt of theinvalidating packet INV causes the sharing devices D3 to invalidatetheir copies of the coherency unit.

Interface 148H's ability to send data corresponding to the coherencyunit to the requesting node may be dependent on the ownership and/oraccess rights requested by the initiating device D1. In this example,interface 148H cannot send the coherency unit until both write access toand ownership of the coherency unit by the home interface 14811 would beproper. The WAIT response sent to interface 14811 indicates that, whileownership is now proper, write access is not proper until both the DATApacket containing the coherency unit and an INV packet have beenreceived. Thus, upon receipt of the WAIT, INV, and DATA, interface 148Hmay send a Data coherency message containing a copy of the coherencyunit to interface 148R in requesting node 140R. Note that an interface148 that may have an access right and/or ownership responsibility for acoherency unit may be sent INV packets in order to maintain thecoherency protocol for coherency units involved in multi-nodetransactions. For example, as part of a locally-initiated PTP RTOtransaction, the home memory subsystem for the requested coherency unitmay send an INV packet to the interface in order to update theinterface's access right to the coherency unit. Similarly, if a PRTO isinitiated within a node, an interface in that node may be sent an INVpacket in order to update the interface's access right to the coherencyunit specified in the PRTO.

In response to the Data coherency message, interface 148R in requestingnode 140R sends a DATA packet to the requesting device D1 to satisfy itsRTO request. Note that if the address network in requesting node 140Rtransmitted the requesting device's RTO request in BC mode, therequesting device would already have ownership of the coherency unit andwould be prepared to gain write access to the coherency unit uponreceipt of the DATA packet (i.e., since receipt of an RTO packet mayindicate that write access is not dependent on receipt of an INVpacket). If the address network in the requesting node 140R transmittedthe RTO in PTP mode, a device that maps the coherency unit (e.g., amemory subsystem if the node is an LPA node for the coherency unit) orthe address network itself may be configured to send an RTO response tothe requesting device D1 in order to effect the ownership transition.Thus, upon receipt of the DATA packet, D1 may gain write access to thecoherency unit.

In some embodiments, interface 148R may send an Acknowledgment coherencymessage to interface 148H in home node 140H in response to receiving theData coherency message. Receipt of the Acknowledgment coherency messagemay cause interface 148H to release a lock acquired for the requestedcoherency unit within the home node 140H so that other transactionsinvolving that coherency unit may be handled. Additionally, if therequesting node is an LPA node, the interface 148R may send a PDU packetto the home memory subsystem (not shown) in the requesting node in orderto update the gTag to gM in the requesting node 140R and to indicatethat the interface supplied the data needed to complete the pending RTO.

FIG. 26 shows an example of another RTO transaction in one embodiment ofa multi-node computer system. In this example, the gM node is not thehome node. Three nodes are illustrated: home node 140H, requesting node140R, and slave node 140S. Requesting node 140R is gI for a particularcoherency unit and contains a device D1 that is initiating an RTOtransaction for the coherency unit. Home node 140H is the home node forthe requested coherency unit. Slave node 140S is the current gM node andcontains an active device D2 that is currently the owner of therequested coherency unit.

As in the example shown in FIG. 25, device D1 in requesting node 140Rinitiates an RTO transaction by sending an RTO request on the addressnetwork. The address network conveys the RTO request to interface 148R.As above, the address network may be configured to convey the request tothe interface in either BC or PTP mode. If the request is conveyed inPTP mode, the request may be conveyed to a memory subsystem withinrequesting node 140R that subsequently sends the request to theinterface (e.g., as a REP packet) in response to an indication that theRTO cannot be satisfied within the node (e.g., the coherency unit's gTagis gS or gI). In response to the RTO request, interface 148R sends acoherency message indicative of the request (Home RTO) to interface 148Hin home node 140H.

Interface 148H receives the Home RTO coherency message and determinesthe gTag of the requested coherency unit. In one embodiment, home memorysubsystem M may maintain a gTag and other global information for thecoherency unit and may provide that gTag and information to interface148H (e.g., in a DATAM packet sent in response to a PMR packet, notshown). In this example, the global access state within the home node isgI, indicating that the coherency unit is invalid within the home node.In some embodiments, the gI state in home node 140H may indicate thatanother node is the gM node for the coherency unit and that no nodes aregS nodes for the coherency unit (i.e., the home node may always be gS ifany other node is gS). Note that the gI state in a node other than thehome node may not indicate anything other than that the coherency unitis invalid in that node. The home memory subsystem M may also trackwhich node is the current gM node for the coherency unit and communicatethis information to interface 148H (e.g., in the DATAM packet). In analternative embodiment, interface 148H may itself track the current gMnode for the coherency unit. In some embodiments, interface 148H mayquery an interface in each of the other nodes in order to locate thecurrent gM node if no device in the home node is aware of which node isthe current gM node for the coherency unit.

In response to determining that slave node 140S is the current gM nodeof the requested coherency unit, interface 148H sends an RTO coherencymessage (Slave RTO) to interface 148S. In response to the Slave RTOmessage, interface 148S initiates a PRTOM subtransaction to invalidateshared copies within the node and to request a copy of the coherencyunit from the owning device D2. Interface 148S initiates the PRTOMsubtransaction by sending a PRTOM packet on the address network. In thisexample, the PRTOM packet is conveyed in BC mode to active devices D2and D3 and interface 148S within slave node 140S. Note that even if nodevice in the slave node 140S tracks the global access state of therequested coherency unit, the Slave RTO coherency message may indicatethe global access state (gM) of the requested coherency unit in theslave node 140S (i.e., the interface 148H in the home node may encodethe slave node's gTag in the Slave RTO coherency message).

Upon receipt of the PRTOM, the owning device D2 loses ownership of thecoherency unit. Device D2 subsequently responds to the PRTOM by sendinga copy of the coherency unit to interface 148S. Owning device D2 losesaccess to the coherency unit upon sending the DATA packet to interface148S. Sharing devices D3 that have shared access to the coherency unitlose access upon receipt of the PRTOM. In response to receiving thePRTOM and the DATA packet, interface 148S sends a coherency messagecontaining the coherency unit to interface 148R in requesting node 140R.At that point, the coherency unit is in a gI state within slave node140S (although no device within that node may actually maintain thecoherence state information). If slave node 140S is an LPA node,interface 148S may also send an address and/or data packet to the homememory subsystem in that node 140S in order to update the gTag for thecoherency unit (or the home memory subsystem may have updated the gTagin response to the PRTOM).

In response to receiving the Data coherency message containing therequested coherency unit, interface 148R sends a DATA packet to therequesting device D1. Interface 148R may also send an Acknowledgmentcoherency message to interface 148H in home node 140H in order torelease a lock on the coherency unit in the home node. In response toreceiving the Acknowledgment coherency message, the home interface 148Hin the home node 140H may release the lock on the coherency unit and, insome embodiments, send an address and/or data packet to the home memorysubsystem updating the global information to indicate that therequesting node 140R is now the gM node for the requested coherencyunit.

One potential problem that may arise in a multi-node system occurs whenshared copies of a coherency unit need to be invalidated before anactive device gains write access to the coherency unit. In the coherenceprotocol described above, write access is dependent on the requestingdevice gaining a copy of the coherency unit. Thus, cache coherency maybe maintained by not providing data corresponding to the coherency unitto the requesting device until shared copies have been invalidated. In amulti-node system, this may involve not providing data to the requestingnode or to the requesting device in the requesting node until all sharedcopies (both within the requesting node and in other nodes) have beeninvalidated.

FIG. 27 illustrates an example of an RTO transaction in one embodimentof a multi-node computer system 100 where shared copies of a requestedcoherency unit are present in multiple nodes. As before, an activedevice in requesting node 140R requests a copy of a coherency unit bysending an RTO packet on the address network within that node. The RTOmay be conveyed in BC mode, invalidating shared copies within therequesting node. If the requesting node is an LPA node for the requestedcoherency unit, the RTO may alternatively be conveyed in PTP mode to thememory subsystem (not shown) that maps the coherency unit, which may inturn convey the RTO to interface 148R (e.g., as part of a REP packetsent in response to an indication that the coherency unit is gS or gI inthe requesting node), convey an RTO or WAIT response to the requestingdevice D1, and/or send invalidating packets that invalidate any sharedcopies within the node.

In response to the RTO, interface 148R sends a Home RTO coherencymessage to interface 148H in home node 140H. The requested coherencyunit is gS in the home node (e.g., as indicated by a gTag maintained bythe home memory subsystem M for the coherency unit). In one embodiment,global information maintained in home node 140H for the requestedcoherency unit may identify gS nodes (or groups of nodes that mayinclude gS nodes) for the coherency unit. In alternative embodiments,the global information may simply indicate that other nodes may have ashared copy.

Since the global information for the coherency unit indicates that othernodes may have shared copies of the coherency unit, interface 148H sendsInvalidate coherency messages to the gS nodes (interface 148H may alsosend Invalidate coherency messages to all or some of the other gI nodesin the computer system in some embodiments). Since the home node is a gSnode (as is illustrated in FIG. 27), the home memory subsystem M mayprovide the data to interface 148H. Once shared copies within the nodehave been invalidated (e.g., as indicated by receipt of the DATA packetand the INV packet) and ownership of the coherency unit is proper (e.g.,as indicated by receipt of the WAIT packet), interface 148H may providethe requested coherency unit to requesting node 140R. In addition,interface 148H may provide a count indicating how many other nodes weresent Invalidating coherency messages. Receipt of the Data+Countcoherency message may indicate to interface 148R that a data packetcorresponding to the coherency unit should not be provided to therequesting device D1 until each node that received an Invalidatecoherency message from home node 140H has acknowledged invalidating anyshared copies.

Slave interface 148S in slave node 140S may respond to the Invalidatecoherency message received by sending a PI (Proxy Invalidate) packet onthe address network. In one embodiment, the PI packet may be conveyed inBC mode. Each active device D3 loses its access rights to the coherencyunit in response to receipt of the PI packet. In response to anindication that shared copies have been invalidated (e.g., in responseto receipt of the PI packet conveyed in BC mode), interface 148S sendsan Acknowledgment coherency message to the requesting interface 148R inrequesting node 140R acknowledging that shared copies within slave node140S have been invalidated.

Interface 148R in requesting node 140R may be configured to not providethe coherency unit to D1 until interface 148R has received a number ofinvalidation acknowledgments equal to the count indicated in theData+Count coherency message received from the home node. Once therequisite number of invalidation acknowledgments has been received,interface 148R may send a DATA packet containing the requested coherencyunit to the requesting device D1. In response to receiving the DATApacket and an indication that any shared copies within the node havebeen invalidated (e.g., an RTO conveyed in BC or PTP mode or a WAIT andINV conveyed in PTP mode), the requesting device gains write access tothe requested coherency unit. Interface 148R may also send anAcknowledgment coherency message to the home node 140H so that a lock onthe coherency unit may be released.

The above example shows the interface 148R in the requesting nodewaiting until it receives invalidation acknowledgments from all of theslave nodes that may have had shared copies before providing a datapacket corresponding to the requested coherency unit to the requestingdevice. As a result, the requesting device does not gain write access tothe coherency unit until all shared copies of the coherency unit havebeen invalidated. In other embodiments, other devices may delayproviding the coherency unit to the requesting device. For example, inone embodiment, the interface 148H in the home node 140H may beconfigured to receive invalidation acknowledgments from the slavedevices that were sent invalidating coherency messages. In response toreceiving a number of acknowledgments equal to the number of nodes thatwere sent invalidating coherency messages, the home interface 148H mayprovide the interface in the requesting node 140R with the copy of therequested coherency unit. In general, any scheme that delays providingthe requesting device with a data packet corresponding to the coherencyunit until shared copies in other nodes have been invalidated may beused to maintain cache coherency within the multi-node computer system.

FIG. 28 shows another example of an RTO transaction in one embodiment ofa computer system. In this embodiment, a computer system includes aslave node 140S and a home node 140H. Slave node 140S includes aninterface 148S and an active device D2, and home node 140H includesinterface 148H, memory subsystem M, and active device D1.

A device D1 initiates a RTO transaction for a coherency unit whose homenode is home node 140H. In this embodiment, packets for the requestedcoherency unit are conveyed in PTP mode in home node 140H. Thus, the RTOrequest packet is conveyed to memory subsystem M. Memory subsystem M(or, in one embodiment, the address network in home node 140H) returnsan RTO response to the requesting device D1, causing the requestingdevice to gain an ownership responsibility for the requested coherencyunit. However, since the home node is gS for the requested coherencyunit, the memory subsystem cannot complete the RTO transaction byproviding D1 with data. Instead, the memory subsystem M sends a REPpacket corresponding to the RTO request to interface 148H so that sharedcopies of the requested coherency unit in other nodes can beinvalidated. The home interface 148H locks the coherency unit and sendsout Slave Invalidate coherency message to slave nodes such as node 140Sthat may have shared copies of the requested coherency unit. Homeinterface 148H also tracks how many nodes it sends invalidationcoherency messages so that it knows how many invalidationacknowledgments to receive before providing the requested coherency unitto device D1.

In slave node 140S, interface 148S receives the Slave Invalidatecoherency message from the home node 140H and responds by sending PI(Proxy Invalidate) packets on the address network to any client devices,like device D2, that may have a shared access right associated with therequested coherency unit. Once any shared copies have been invalidated(e.g., as indicated by interface 148S receiving its own PI on theBroadcast network), interface 148S provides an Acknowledgment coherencymessage to the home node.

Once each slave node 140S that was sent a Slave Invalidate coherencymessage responds with an Invalidation Acknowledgment coherency message,the home interface 148H causes the requested coherency unit to besupplied to the requesting device D1 to complete the RTO transaction andreleases the lock on the coherency unit. In one embodiment, the homeinterface 148H sends a PU (Proxy Upgrade) packet to the home memorysubsystem 148H, causing home memory subsystem to provide a DATA packetcontaining the requested coherency unit to the requesting device D1. Thehome memory subsystem's receipt of the PU packet may also cause it toupgrade the global access state for the requested coherency unit to gM.

The above examples show how, in some embodiments, active devices mayinitiate transactions in the same way in multi-node as those activedevices do in single node systems. Likewise, active devices may initiatetransactions for both LPA and non-LPA coherency units in the same way.Accordingly, the active devices may not need to track whether they arein a multi-node or single node system and whether they are requesting anLPA or non-LPA coherency unit in order to operate properly (note thatactive devices may need to be configured to respond to all of thepackets that may be received in both single and multi-node systems(e.g., proxy packets sent by interfaces 148) in order to operatecorrectly in a multi-node system, however). Thus, the memory subsystems144 and the interfaces 148 may operate in such a way that an activedevice's presence in a multi-node or single node system and an LPA ornon-LPA node is transparent to that active device. As a result, in someembodiments, active devices may not have different operating modes thatare used dependent upon the system (LPA/non-LPA, single/multi-node)within which they are included.

The above examples show exemplary RTO transactions in one embodiment ofa multi-node system. Other transactions that require shared copies to beinvalidated before providing an access right to an initiating device mayalso be implemented in a multi-node system. For example, the requestingdevice in a WS transaction should not gain an access right to therequested coherency unit until shared copies in other nodes have beeninvalidated. In a WS transaction, the requesting device may gain writeaccess to the requested coherency unit upon receipt of an ACK packetcorresponding to the coherency unit on the data network. Accordingly,the interface in the requesting node (or, in some embodiments, the homenode) may be configured to delay providing the ACK packet to therequesting device until shared copies of the coherency unit in othernodes have been invalidated and/or the acknowledgment from the owningdevice has been received.

Interface

FIG. 29 shows one embodiment of an interface 148. In this embodiment,interface 148 includes several data queues 830 and address queues 840.Data queues 830 and address queues 840 may be respectively coupled tothe data and address networks within the node 140 containing interface148. Data queues 830 include data-in queue 820B and data-out queue 820A.Address queues 840 include address-in queue 820C and address-out queue820D. In one embodiment, a packet may be defined as being sent byinterface 148 when it is placed in address-out queue 820D or data-outqueue 820A. Similarly, a packet may be defined as being received byinterface 148 when it is popped from address-in queue 820C or data-inqueue 820B. In one embodiment, data queues 830 and address queues 840may be FIFO queues.

Interface 148 includes one or more bus agents 810 that monitoraddress-in queues 820C and data-in queues 820B. In addition to bus agent810, interface 148 may include one or more request agents 802, one ormore home agents 804, and/or one or more slave agents 806. In responseto determining that an address packet is part of a transaction that mayinvolve interface 148, bus agent 810 may add a record corresponding tothe packet to an outstanding transaction queue 814. For example, inresponse to RTS, RTO, RS, WB, WBS, RTWB, WS, RIO, WIO and/or INT packetsthat specify a coherency unit that is not LPA in the node, bus agent 810may add a record corresponding to the packet to the outstandingtransaction queue 814. In response to PRTOM, PRTO, PIM, PI, WAIT, PRTSM,PRSM, PRN, and certain DATA, DATAM, DATAN, NACK, ERR, and INV packets,the bus agent 810 may forward that packet to the request, slave, or homeagent that initiated the subtransaction in which that packet is involved(e.g., based on a transaction ID in the received packet).

In LPA nodes, certain requests may be conveyed by the address network toa device within the node that maps the requested coherency unit (e.g., ahome memory subsystem). For example, the memory subsystem may maintaingTags for coherency units that map to the memory subsystem. If acoherency unit's gTag indicates that interface 148 should be involved inthe transaction (e.g., because the node is gS or gI for the coherencyunit), the memory subsystem may send a REP (Report) packet identifyingthe coherence unit and the type of transaction to the interface 148responsible for communicating with the home node (e.g., in systems withmore than one interface per node, each interface may handle transactionsinvolving coherency units within a designated range of addresses). Thus,bus agent 810 may also add records corresponding to REP packets to theoutstanding transaction queue 814.

The outstanding transaction queue 814 may not be a FIFO queue in someembodiments. However, agents 802, 804, and 806 may be configured toaccess outstanding transaction queue 814 so that only the first recordidentifying a given coherency unit may be selected, and so that no morethan one record identifying a given coherency unit may be selected at agiven time. In some embodiments, the agents may also be configured toaccess the outstanding transaction queue 814 so that all records thatcorrespond to non-cacheable transactions initiated by the same activedevice are selected in the order in which the corresponding records werereceived.

Request agents 802, home agents 804, and slave agents 806 may each beconfigured to send and/or receive packets on the address and datanetworks in response to records in the outstanding transaction queue814. Each agent 802, 804, and 806 may also be coupled to one or morequeues (not shown) that are coupled to send and receive communicationson the inter-node network 154. In some embodiments, there may be morethan one agent of any given type. However, in order to maintainordering, some agent actions may be limited in some embodiments. Forexample, if there are multiple bus agents, only one bus agent 810 may beable to handle packets for a given address. Similarly, if there aremultiple request agents 802, only one request agent may be able tohandle a request involving a given address at any one time.

A request agent 802 may handle records in the outstanding transactionqueue 814 for transactions that originated within the node (e.g., an RTOtransaction initiated by an active device within the node, as discussedabove). In one embodiment, a request agent 802 may handle RTS, RTO, RS,WB, WBS, RTWB, WS, RIO, WIO, and INT records corresponding to requeststhat cannot be fully handled within the node. A request agent 802 may beresponsible for sending coherency messages to the home agent in the homenode for a given coherency unit if the transaction cannot be satisfiedwithin the node. Note that if the node containing request agent 802 isthe home node for a specified coherency unit and the transaction cannotbe satisfied in the node, request agent 802 may send a coherency messageto the home agent 804 in the same interface 148 (this coherency messagemay be sent internally without appearing on the inter-node network 154).A request agent 802 may also handle subsequent coherency messagesreceived from the home agent in the home node and/or slave agents inslave nodes as part of a transaction. The request agent 802 may send acoherency message to the home agent in the home node in order to releasea lock on a coherency unit at the end of the transaction involving thatcoherency unit. If the node containing interface 148 is an LPA node, therequest agent 802 may send packets on the node's address and/or datanetworks (e.g., PMW and/or DATAM packets) in order to update a gTagmaintained by a home memory subsystem within the node. The request agent802 may also remove records that correspond to the transaction from theoutstanding transaction queue 814 once the transaction is completed.

A home agent 804 receives coherency messages from a request agent 802.These coherency messages specify transactions involving coherency unitswhose home node is the node containing home agent 804. Thus, a homeagent 804 may receive coherency messages from the inter-node network 154requesting initiation of subtransactions that read and/or invalidate acoherency unit. The home agent may include a global information cache850 that stores information identifying the gTag and/or node ID of thegM node for coherency units for which the interface's node is the homenode. The home agent 804 may use information in global information cache850 to determine which types of proxy packets to send to implementsubtransactions in some embodiments. The home agent 804 may also receivecoherency messages that cause the home agent to perform a writesubtransaction (e.g., to write a coherency unit and/or to update a gTagfor a particular coherency unit in a home memory subsystem).

Slave agent 806 receives coherency messages from home agents. Inresponse to these coherency messages, slave agent 806 may send addressand/or data packets within the node. For example, a slave agent 806 mayinitiate subtransactions to read and/or invalidate a coherency unit.

In order to maintain ordering, two types of locks may be used tocoordinate access to coherency units (or to larger units of data in someembodiments). A “home lock” is a lock acquired by the home agent 804(i.e., the home agent in the interface in a coherency unit's home node)for a given unit of data. When the home agent 804 acquires a home lockfor a given coherency unit, no other agent 802 or 806 may performactions involving that coherency unit until the home agent releases thehome lock. Thus, the home lock assures that an interface is performingat most one transaction or subtransaction for a given coherency unit ata time. In one embodiment, the home agent 804 may release the home lockin response to receiving an acknowledgment from the request agent in therequesting node.

Another type of lock that may be used is a “consumer lock.” The consumerlock may be acquired and released by request agents 802, home agents804, and slave agents 806 in order to coordinate the removal of recordsfrom outstanding transaction queue 814. When the consumer lock has beenacquired, no other agent 802, 804, or 806 may access records involvingthe locked unit of data. However, acquisition of the consumer lock for agiven coherency unit or other unit of data may not affect a bus agent810's ability to add new records involving that coherency unit to theoutstanding transaction queue 814.

Each record in outstanding transaction queue 814 may include a“requested” flag in some embodiments. The requested flag may initiallybe set to “false” when the record is created by bus agent 810. A requestagent 802 may set the flag to “true” when the request agent sends acoherency message corresponding to the record to the home agent 804 inthe coherency unit's home node. The value of the requested flagindicates which transactions are already being handled by the interface.A consumer lock acquired by a request agent 802 may be released afterthe request agent sets the value of the requested flag to true.

The consumer and home locks and the requested flag may be used to ensurethat transactions involving the same coherency unit (or other unit ofdata, depending on the resolution of the home and consumer locks) arehandled in the proper order. For example, the request agent 802 may beconfigured to select the first request in the outstanding transactionqueue 814 that specifies unlocked data and whose requested flag equalsfalse.

Invalidations in a Multi-Node System

In some embodiments, a multi-node system 100 may be configured so thatif a static coherency unit is gM in one node, no other node in themulti-node system is a gS or gM node for that coherency unit.Conversely, if any node is gS for the coherency unit, no node is gM forthe coherency unit.

By specifying that if there are any gS nodes, no active device has writeaccess to a coherency unit and that if an active device has write accessto a static coherency unit, there are no gS nodes, some transactions maybe simplified. For example, RTO and WS transactions require that sharedcopies of a requested coherency unit be invalidated. If an activedevice's write access to a coherency unit implies that no other devicein another node has an access right to the coherency unit, RTOtransactions within a non-LPA node containing an owning device mayproceed as they would in a single node system. For example, if there isan active device with write access in one node, it implies that thereare no sharing devices in any other node. Therefore, if an owning devicereceives a request for write access (e.g., a RTO or WS) from anotherdevice in the same node, the owning device can provide datacorresponding to the coherency unit to the requesting device withouthaving to wait for an indication that shared copies of the requestedcoherency unit have been invalidated in other nodes (although therequesting device's write access is still dependent on shared copieswithin the requesting device's node being invalidated). In oneembodiment, such a configuration may reduce transaction time and/orreduce inter-node network traffic for certain transactions.

In order to ensure that there are no gS or other gM nodes if there is agM node and that there are no gM nodes if there are any gS nodes,certain transactions may have different effects depending on whetherthey are initiated in the same node as an active device that currentlyhas write access to the requested coherency unit. For example, anytransaction that provides a device in another node with shared access toa coherency unit will remove ownership from the owning device. Incontrast, if a device within the same node as the owning device requestsshared access, the owning device may retain ownership (although in someembodiments, the owning device may not retain ownership in eithersituation).

In one embodiment, transactions requesting shared access that areinitiated within the same node as the owning device may be performed asdescribed above with respect to a single-node system. In order todifferentiate transactions that are initiated in another node,subtransactions initiated by an interface within the owning node mayinvolve different packet types. In one embodiment, the packets used forremote subtransactions (i.e., subtransactions within a node that arepart of transactions initiated outside of that node) may be classifiedas “proxy” packets, as shown in FIG. 22. Thus, an RTS packet may be usedin the node in which an RTS transaction is initiated, while a PRTSM(Proxy RTS Modified) packet may be used in other nodes that participatein the RTS transaction. Upon receipt of an RTS packet, an owning devicemay retain ownership of the requested data. In contrast, upon receipt ofa PRTSM packet, an owning device will lose ownership, since the proxypacket indicates that the RTS transaction was initiated in another node.

FIG. 30 shows an example of an RTS transaction in one embodiment of amulti-node computer system 100. In this embodiment, the multi-nodecomputer system includes at least three nodes. A requesting node 140Rincludes an active device that initiates an RTS transaction for sharedaccess to a coherency unit. Home node 140H is the home node for therequested coherency unit. Slave node 140S contains an active device thatis currently the owner of the requested coherency unit.

Active device D1 initiates an RTS transaction by sending an RTS packeton the address network in requesting node 140R. In this example,requesting node 140R is a gI node for the requested coherency unit (andthus the transaction cannot be completed within the node 140R), sointerface 148R sends a Home RTS communication to interface 148H in homenode 140H.

In response to the Home RTS communication, the interface 148H acquires alock on the specified coherency unit. Since the home node 140H being gIfor the requested coherency unit (e.g., as indicated by home memorysubsystem M), interface 148H sends a Slave RTS communication to the gMnode for the requested coherency unit. Information identifying the gMnode for the coherency unit may be maintained by interface 148H and/orhome memory subsystem M.

The Slave RTS coherency message causes interface 148S in slave node 140Sto send a PRTSM (Proxy RTS Modified) packet to the owning active deviceD2. Receipt of the PRTSM packet causes active device D2 to loseownership of the coherency unit. When D2 subsequently sends a datapacket containing a copy of the requested coherency unit, D2 loses writeaccess. However, D2 may retain read access to the coherency unit.Receipt of the DATA packet from device D2 allows interface 148S to senda communication to the requesting node containing the requestedcoherency unit. In this example, a Data Relinquish coherency message issent to the requesting node 140R, indicating that the node hasrelinquished its ownership of the coherency unit (i.e., it is no longera gM node for that coherency unit). The Data Relinquish coherencymessage causes interface 148R to send a Data/Acknowledgment coherencymessage to the home node acknowledging satisfaction of the transaction,indicating that slave node 140S and requesting node 140R are now gSnodes, providing a new gTag value (gS) for home node 140H, and/orproviding an updated copy of the coherency unit to home node 140.Additionally, interface 148R provides requesting active device D1 with acopy of the requested coherency unit on the data network to satisfy thetransaction. Note that as used herein, a transaction is “satisfied” whenthe requesting device gains the requested access right or when thetransaction completes, whichever comes first. A transaction “completes”when no more coherency messages or data or address packets are sent inresponse to the initial request.

In response to the Data/Acknowledgment coherency message from requestingnode 140R, interface 148H in home node 140H may send PMW and DATAMpackets (not shown) on the address and data networks respectively tohome memory subsystem M in order to update the memory subsystem's copyof the coherency unit and/or global information such as the gTag for thecoherency unit in the home node. The interface 148H may also release alock on the coherency unit, allowing other inter-node networktransactions involving that coherency unit to be handled.

FIG. 31 shows another example of an RTS transaction in one embodiment ofa multi-node computer system. In this example, an active device D1 in arequesting node 140R initiates an RTS transaction. No device in therequesting node owns the requested coherency unit, so interface 148Rforwards the request to the home node 140H for the coherency unit.Interface 148H receives the Home RTS coherency message and locks thecoherency unit. Since the home node 140H is gM, interface 148H initiatesa PRTSM subtransaction by sending a PRTSM packet on the address network.In this example, the address network conveys the PRTSM in PTP mode tothe home memory subsystem M for the coherency unit. Receipt of the PRTSMmay cause the home memory subsystem M to update the gTag for therequested coherency unit to gS. The home memory subsystem sends a PRTSMresponse to the owning device D2 (e.g., as identified in a directory).In response to receipt of the PRTSM, the owning device D2 losesownership of the requested coherency unit and, at a subsequent time,forwards a copy of the requested coherency unit (DATA) to interface 148Hon the data network. Sending the data packet causes active device D2 tolose write access to the coherency unit. Active device D2 may retainread access to the requested coherency unit. In response to receivingthe DATA packet, interface 148H communicates the coherency unit tointerface 148R in the requesting node. Interface 148H may also send aPMW and a DATAM packet to the home memory subsystem M in order to updatethe home memory subsystem's copy of the coherency unit.

Interface 148R receives the Data coherency message from the interface inhome node 140H. Interface 148R then sends a DATA packet containing thecoherency unit to the requesting device. Interface 148R also sends anAcknowledgment coherency message to the interface in the home node 140Hindicating that the transaction is satisfied, allowing the interface14811 to release the lock on the coherency unit at the home node 140H.

Different Types of Address Packets for Nodes with Different gTags

A transaction initiated within a node may cause certain ownership and/oraccess right changes within that node during the transaction, but thegTag of the requested coherency unit may not be updated until later inthe transaction. For example, a device D1 in a first node (which is notthe home node) may initiate an RTS transaction for a coherency unit. Therequested coherency unit may be gS within its home node. Before theinterface within the home node initiates a subtransaction to provide therequesting device D1 with a copy of the requested coherency unit,another device D2 within the home node may initiate an RTO for thatcoherency unit. Since the home node is gS, the home memory subsystemforwards the RTO to the interface (e.g., as a REP packet) so that theinterface can send communications invalidating shared copies in other gSnodes. However, the memory may also send an RTO or WAIT response to therequesting device D2, causing it to become the owner of the requestedcoherency unit. Assuming the interface in the home node receives the RTSbefore it receives the RTO, the RTO will not complete until the RTS hascompleted (e.g., since handling the RTS transaction will lock thecoherency unit in the home node). However, the device D2 that initiatedthe RTO is the owning device within the home node and will be unable toprovide a copy of the coherency unit in response to a proxy RTS untilthe RTO completes. In order to avoid deadlock and to ensure thattransactions complete in the order in which they are handled by the homeagent in the home node, the interface may read the copy of the coherencyunit from memory instead of requesting it from the new owning device D2.However, memory may be configured to not respond to requests unless itis the owner of the requested coherency unit. Furthermore, since the RTOshould complete after the RTS, satisfying the RTS should not removeownership from the active device D2 that initiated the pending RTO.

In order to cause memory to respond to the RTS while not removingownership from the device D2 that initiated the subsequent RTO, theinterface may use a special type of proxy read-to-share (PRTS) addresspacket. In one embodiment, there may be two types of proxy requestpackets. One type may be used in non-gM nodes and the other may be usedin gM nodes. In this description, gM-type packets are identified by an“M” at the end of the packet identifier (e.g., PRTOM, PRTSM, and PIM)and non-gM-type packets lack the “M” identifier (e.g., PRTO, PRTS, andPI). The non-gM type of request packets may cause memory to respond,even if it is not the current owner, and not affect the ownership ofowning caches within a node. In contrast, the gM type of packets causeowning active device to give up ownership and are not responded to bynon-owning memory subsystems. Both classes of address packets mayinvalidate shared copies if they correspond to a transaction thatinvalidates shared copies (e.g., RTO, WS). Note that in someembodiments, PRTS packets may be implemented as PMR packets, asdescribed below.

An interface 148 may be configured to cache gTags and other globalinformation (e.g., node IDs of gM nodes and/or indications of whetherany nodes may have shared copies) for recently accessed coherency unitsfor which the node that includes that interface is the home node. Forexample, looking back at FIG. 29, each home agent 804 may include aglobal information cache 850. In order to determine what type of proxyrequest packet (e.g., PRTS or PRTSM) to send on the address network fora given coherency unit, the interface 148 may lookup that coherency unitin its global information cache. If the coherency unit's gTag is storedin the global information cache, the interface 148 may use the cachedgTag to select the appropriate type of proxy request packet to send. Ifnot, the interface 148 may send a PMR packet to the coherency unit'shome memory subsystem to obtain the coherency unit's gTag. Uponreceiving the coherency unit's gTag, the interface 148 may send theappropriate type of proxy request packet and cache the gTag (and/orother global information associated with the coherency unit) in theinterface's global information cache.

FIG. 32 shows one embodiment of a computer system that includes arequesting node 140R and a home node 140H. In this example, an activedevice D1 initiates an RTS transaction for a first coherency unit (e.g.,in response to a read prefetch or a read miss in one or more cachesassociated with D1). D1 initiates the RTS transaction by sending an RTSaddress packet on the requesting node's address network. In thisexample, the requested coherency unit does not map to a memory subsystemwithin the requesting node. Accordingly, the address network conveys therequest to the interface 148R. In order to satisfy the RTS, interface148R sends the Home RTS coherency message on the inter-node network tothe interface 148H in the home node 140H.

At some time before the home interface 148H begins handling the RTStransaction that was initiated in the requesting node 140R, a device D2in the home node 140H initiates an RTO transaction for the samecoherency unit. In this example, D2 initiates the RTO by sending an RTOrequest on the home node's address network (packets transfers that arepart of the RTO transaction are represented by dashed lines in FIG. 32).The address network conveys the RTO request to the home memory subsystemin PTP mode, and the home memory subsystem sends an RTO response back tothe requesting device D2. Receipt of the RTO response causes device D2to gain an ownership responsibility (indicated by subscript “O”) for thefirst coherency unit. Additionally, the memory subsystem may recognizethat satisfying the RTO involves invalidating shared copies in othernodes since the gTag for the requested coherency unit is gS. In order tocomplete the transaction, the memory subsystem sends a REP data packetcorresponding to the RTO to interface 138H. Interface 148H adds a recordcorresponding to the REP packet to its outstanding transaction queue.

In this example, the remote RTS is handled (e.g., by a home agent)before the REP corresponding to the RTO is handled (e.g., by a requestagent). Additionally, the coherency unit may be locked by the home agentin response to the Home RTS coherency message, preventing handling ofthe REP until completion of the RTS. Accordingly, even though D2 has anownership responsibility associated with the first coherency unit, thehome node is gS for that coherency unit when the RTS is handled byinterface 148H. Based on the first coherency unit's current globalaccess state (gS) within the home node, interface 148H may use anaddress packet from the non-gM class of packets (e.g., PRTS) to requesta copy of the coherency unit from memory. The PRTS does not affect D2′ sownership responsibility and causes the memory to send the interface148H a data packet containing a copy of the requested coherency unit,even though the memory is not the owner of the coherency unit.Accordingly, the home interface receives the data necessary to completethe RTS transaction without affecting the ownership state of the activedevice that is waiting for the subsequent RTO to complete. Onceinterface 148H receives the coherency unit, it may send a coherencymessage to the interface 148R in requesting node 140R, which in turnconveys the coherency unit on the data network to requesting device D1.Interface 148R may then send an acknowledgment coherency message to theinterface in the home node, allowing the home node to release the lockacquired for the first coherency unit. Once the lock is released,subsequent transactions involving that coherency unit, such as the RTO,may be handled by the home interface 140H.

If the local RTO is handled by the home interface before the remote RTS(e.g., a REP packet corresponding to the RTO is selected from theinterface's outstanding transaction queue by a request agent and passedto the home agent before the RTS is handled by the home agent), the gTagin the home node for the requested coherency unit is gM (because deviceD2 has write access to the coherency unit) when the home interfacebegins handling the RTS. Since the current global access state indicatesthat the home node is gM for the requested coherency unit, the interface148H sends a PRTSM packet instead of a PRTS. The PRTSM will not beignored by the owning active device, nor will it be responded to by thenon-owning memory subsystem. Accordingly, the active device D2 that ownsthe requested coherency unit (the device that initiated the earlier RTOand received ownership as part of the RTO) will lose ownership uponreceipt of the PRTSM. The device D2 will also lose write access uponsending a copy of the coherency unit to the interface 148J.Additionally, the gTag of the home node will become gS in response tothe memory subsystem's receipt of the PRTSM.

Speculative Subtransactions

Having two types of subtransactions, one for gM nodes and one for non-gMnodes, may allow an interface to speculatively initiate a subtransactionwithout knowing the current gTag of the requested coherency unit withinthe node. For example, each memory subsystem 144 may be configured torespond to certain types (e.g., non-gM types) of address packets sentfrom an interface 148 by sending a data packet containing a copy of therequested coherency unit and its gTag. Furthermore, these types ofaddress packets may not affect the ownership responsibilities of owningactive devices. Based on the gTag returned by the memory, an interfacemay determine if the type of address packet that was speculatively sentis correct. If, given the gTag, the speculative address packet is notthe correct type of address packet, the interface may initiate anothersubtransaction using the correct type of address packet.

FIG. 33 shows one example of how an interface in a home node mayinitiate a speculative subtransaction. In FIG. 33, an embodiment of acomputer system includes a requesting node 140R and a home node 140H.The requesting node includes an active device D1 and an interface 148R.The home node includes two active devices D2 and D3 and a memorysubsystem M. Before D1 initiates an RTO transaction for a firstcoherency unit, D1 has the first coherency unit in state IN (Invalid, NoOwnership), D2 has the first coherency unit in state RO (Read Access,Ownership), D3 has the first coherency unit in state RN (Read Access, NoOwnership), and the global access state of the first coherency unitwithin the home node is gM.

D1 initiates an RTO transaction (e.g., in response to a write miss inD1's cache) by sending an RTO request on the requesting node's addressnetwork. The RTO request is conveyed to interface 148R. Interface 148Rsends a coherency message indicative of the request to the interface148H in the home node 140H for the first coherency unit.

When interface 148H begins handling the remote RTO, interface 148H maynot be aware of the current gTag of the requested coherency unit withinthe home node. For example, in embodiments where interface 148H cachesgTags for coherency units for which node 140H is the home node,interface 148H may experience a gTag cache miss. While interface 148Hcould query the home memory subsystem for the gTag for the firstcoherency unit (e.g., using a PMR packet), interface 148H may insteadspeculatively initiate a PRTO subtransaction by sending an addresspacket from the non-gM type of proxy RTO packets (e.g., PRTO) on theaddress network. Speculatively initiating PRTO subtransactions mayimprove performance in situations where the speculation is correct. Asused herein, a speculative subtransaction is one in which, at the timethe subtransaction is initiated, it is not determinative whether thepacket used to initiate the subtransaction is of the correct type forthe global access state of the requested coherency unit.

In this example, the speculative PRTO is conveyed in broadcast mode todevices D2 and D3 and the home memory subsystem M. The speculative PRTOmay invalidate non-owned shared copies of the first coherency unit buthave no effect on ownership responsibilities of owning active devices.Thus, upon receipt of the PRTO, D3 may lose its access right to thefirst coherency unit but D2 may retain its ownership responsibility forand access right to the coherency unit. The memory subsystem may respondto the speculative PRTO by conveying the current gTag for the firstcoherency unit and/or the memory's copy of the coherency unit (e.g., aspart of a DATAM packet) to the interface 140H.

In response to the data packet sent by the memory subsystem, theinterface recognizes that the speculation was incorrect given thecurrent gTag (gM) of the first coherency unit within the home node. Inresponse, the interface may resend a non-speculative address packet(e.g., PRTOM) of the gM type of PRTO subtransaction packets. In responseto this address packet, the owning device D2 may lose ownership andcommit to send a copy of the requested coherency unit to the interface.When D2 sends the DATA packet containing the first coherency unit, itloses write access to the coherency unit. The home memory subsystemupdates the gTag for the coherency unit to be gI in response to thePRTOM. Note that in some embodiments, the home memory subsystem may notupdate the gTag in response to a misspeculated PRTO (i.e., if the PRTOis received in a gM node).

Once the interface 148H receives the DATA packet from D2, it maycommunicate the coherency unit to the requesting node 140R. In response,the interface 148R may send a DATA packet to the requesting device D1,completing the RTO transaction, and send an acknowledgment coherencymessage to the home node so that the home node can release a lockacquired for the first coherency unit.

Note that an interface may also be configured to initiate otherspeculative subtransactions (e.g., speculative read-to-sharesubtransactions) in addition to speculative read-to-own subtransactionsin some embodiments.

In some embodiments, a memory subsystem may be configured to “correct” aspeculative subtransaction by determining if the address packet sent bythe interface is the correct type of address packet, given the gTag ofthe specified coherency unit within the node. If the speculation isincorrect, the memory subsystem may resend the correct type of addresspacket to an owning device and/or to any sharing devices.

FIG. 34 shows one example of an embodiment of a computer system where amemory subsystem is configured to correct an incorrectly speculatedsubtransaction. In this example, the computer system includes arequesting node 140R and a home node 140H. Home node 140H is the homenode for a coherency unit being requested by an active device D1 inrequesting node 140R. Home node 140H is the gM node for the coherencyunit and includes an active device D2 that has ownership of and writeaccess to the requested coherency unit, an interface 148H, and a memorysubsystem M. Requesting node 140R includes active device D1 andinterface 148R.

Device D1 initiates an RTO transaction for a first coherency unit bysending an RTO request on the address network of requesting node 140R.The RTO request is conveyed to an interface 148R. Interface 148R sends acoherency message, Home RTO, indicative of the request to interface 148Hin home node 140H.

In response to the Home RTO coherency message, interface 148H locks thecoherency unit and sends a speculative PRTO on the address network ofthe home node 140H (e.g., in response to a miss in a gTag cache). Inthis embodiment, packets specifying the requested coherency unit aretransmitted in PTP mode in the home node, so the home node's addressnetwork conveys the PRTO to the home memory subsystem M. In response toreceiving the PRTO, the memory subsystem M determines that the PRTO isincorrect given the current gTag (gM) of the requested coherency unitwithin home node 140H. Instead of (or, in some embodiments, in additionto) returning data and the current gTag to the interface 148H, memorysubsystem M sends a corrected PRTOM packet to the owning device D2 aswell as to the interface 148H and updates the gTag to indicate that thenew gTag is gI. Memory subsystem M may also send INV requests to anysharing devices (not shown) and to interface 148H. Note that if any INVpackets are sent, interface 148H may be sent a WAIT packet instead of aPRTOM. In response to receipt of the PRTOM, the owning device D2 losesownership of the requested coherency unit and (at a subsequent time)sends a copy of the requested coherency unit to interface 148H. D2 losesaccess to the requested coherency unit upon sending the DATA packetcontaining the requested coherency unit.

In response to receiving the PRTOM and the DATA packet, the interface148H may send a Data coherency message containing the requestedcoherency unit to the requesting node. In response, interface 148R inthe requesting node 140R may send a DATA packet containing the coherencyunit to D1, allowing D1 to gain write access to the coherency unit.Interface 148R may send an Acknowledgment coherency message to the homeinterface 148H, allowing the home interface 148H to release a lock onthe coherency unit.

Some embodiments of a memory subsystem may only correct speculativesubtransactions involving PTP mode coherency units. For example, if amemory subsystem is configured to resend a correct type of addresspacket for a BC mode coherency unit, the memory subsystem will berequired to respond to a packet received on a Broadcast Network bysending a second address packet on the Broadcast Network. Such asituation may lead to deadlock. Thus in some embodiments, memorysubsystems may be configured to correct speculative transactions whendoing so involves sending a packet on a different virtual network (e.g.,the Response Network) than the one on which the initial packet isreceived (e.g., the Request Network).

Transaction to Allow an Interface to Read Shared Data from Memory

As the above discussion shows, certain situations may arise where aninterface needs to read data from memory but the memory is not thecurrent owner of the data. In one embodiment, a special packet encodingmay be used to access shared data in memory. Memory subsystems may beconfigured to respond to this type of packet encoding with a copy of thespecified coherency unit, regardless of the memory's current ownershipand/or access rights for that coherency unit. In some embodiments,memory subsystems may also be configured to respond to that type ofpacket with global information (e.g., the global access state, the nodeID of gM node, and an indication of whether any nodes may have sharedcopies) for the coherency unit. In one embodiment, the packet encodingmay be a PMR (Proxy Memory Read) encoding described above with respectto FIG. 23. In many embodiments, a packet used to read shared data frommemory may have no effect on any active device's access rights andownership responsibilities for the specified coherency unit. The packetused to read shared data from memory may also have no effect on thecurrent gTag for the specified coherency unit within the node.

In one embodiment, packet headers may be simplified by using the samepacket encoding used to read shared data from memory (PMR) as a proxyread-to-share (PRTS) packet in nodes that do not have an ownershipresponsibility associated with the requested coherency unit (e.g.,non-gM nodes). However, in such embodiments, it may not be possible fora memory subsystem to correct a speculative PRTS (e.g., when the gTag ofthe node is actually gM) if the same packet encoding is used for bothPRTS and PMR, since the memory subsystem may be unable to determinewhich function a given packet is serving.

Transactions Allowing Interface to Access Coherence State Information

An interface may use special transactions (e.g., PMR and PMW in oneembodiment) to access (i.e., read and/or write) global information suchas the gTag and the node ID of the current gM node for a given coherencyunit within an LPA memory subsystem. These transactions may be ignoredby other client devices (i.e., non-home memory subsystem andnon-interface devices). In other words, the special transactions used toaccess global information may not affect any client device's ownershipresponsibilities for and/or access rights to any coherency unit.Furthermore, a memory subsystem may be configured to always respond(e.g., by modifying a specified coherency unit's gTag and/or providingan interface with a copy of a specified coherency unit's gTag) toaddress packets requesting to read or write global information,regardless of whether that memory subsystem is currently the owner ofthe specified coherency unit. Note that while the exemplary PMR and PMWpackets described above may be used to read and write both globalinformation and coherency units, other embodiments may use differentpacket encodings to allow interfaces to read and write globalinformation than are used to read and write coherency units.

Address Packets Specifying Node ID of Initiating Node

In order to keep the memory's global information from becoming stale, aninterface within a home node may encode the node ID of a requesting nodein invalidating address packets (e.g., PI, PIM, PRTO, PRTOM packets)that invalidate all shared copies within the home node. Upon receipt ofsuch an address packet, the home memory subsystem may update the gTagfor the specified coherency unit to equal gI and update the node ID ofthe gM node to equal the node ID of the requesting node.

For example, returning to FIG. 25, when interface 148H in home node 140Hreceives the RTO communication from requesting node 140R, interface 148Hmay encode the node ID of requesting node 140R into a PRTOM packet andsend that packet upon the home node's address network. Upon receipt ofthe PRTOM, the home memory subsystem may update the global informationfor the requested coherency unit to indicate that the home node is nowgI and that the node ID of the gM node is the node ID indicated in thePRTOM packet (i.e., requesting node 140R's node ID). Note that theinterface 148H may also update global information cached by theinterface (e.g., in global information cache 850) in response to sendingan invalidating packet (or in response to receiving a coherency messagethat causes the interface to send such an invalidating packet). Forexample, the interface 148H may update a gTag and the node ID of the gMnode for a coherency unit upon sending an invalidating packet specifyingthat coherency unit.

Tracking Ownership Responsibility within a Multi-Node System

Various devices may maintain state information indicating which devicesand/or nodes have ownership responsibilities associated with certaincoherency units. By maintaining this information, certain aspects of amulti-node computer system may be simplified. For example, it may beunnecessary to have an owned line (a signal indicating whether not hereexists an active device with an ownership responsibility for therequested coherency unit) for performing BC mode transactions. Ownedlines are typically used in BC mode systems to indicate whether a memorysubsystem should provide data in response to a coherence request. Forexample, in response to an address packet requesting an access right toa coherency unit, an owning active device may assert an owned line,indicating that a memory subsystem should not respond with datacorresponding to the requested coherency unit. If the memory subsystemmaintains certain state information and response bits, owned lines maynot be necessary to determine when the memory subsystem should providedata in response to a coherence request.

In some embodiments, a memory subsystem 144 may maintain responseinformation (e.g., in a directory 220 or similar structure or in storage225) for each coherency unit that maps to the memory subsystem. Theresponse information may indicate whether the memory subsystem isresponsible for providing data in response to address packets requestingaccess rights to each coherency unit that maps to the memory subsystem.For example, if the memory subsystem is currently the owner of aparticular coherency unit, the memory's response information for thatcoherency unit may indicate that the memory should respond to addresspackets requesting access rights to that coherency unit. If an activedevice requests write access to and ownership responsibility for thecoherency unit by initiating an RTO, the memory's response informationmay be updated to indicate that the memory is not responsible forproviding data to requesting devices (since the device requesting writeaccess will become the owner of the coherency unit). Note that withrespect to response information, a response is a response that providesdata corresponding to a requested coherency unit (e.g., a REP, DATA,and/or an ACK packet). A memory subsystem may perform other actions(e.g., updating response and/or directory information) in response to anaddress packet requesting an access right to a coherency unit even ifthe response information for the requested coherency unit indicates thatthe memory should not respond to requests for that coherency unit.

In one embodiment, a single bit of response information may bemaintained. For example, if a memory subsystem maintains a single bit ofresponse information in addition to the gTag for each coherency unit,the memory subsystem may use the current response information and thegTag to determine whether to respond to an address packet by sending acopy of the coherency unit and whether to send a REP data packetcorresponding to the request to an interface.

FIG. 35 shows an example of the response information and gTag that maybe maintained for each coherence unit by one embodiment of a memorysubsystem. In this embodiment, the memory subsystem maintains tworesponse states: Yes (indicating that the memory subsystem shouldrespond with data corresponding to the requested coherency unit) and No(indicating that the memory subsystem should not respond with datacorresponding to the requested coherency unit). This embodiment of amemory subsystem also maintains gTags. The memory subsystem may use theresponse information and the gTags when determining how to respond.

As shown in FIG. 35, if an address packet is received requesting anaccess right to a coherency unit for which the memory subsystem'scurrent response is No and the current gTag is gM, the memory subsystemis configured to allow the owning device within the node to respond. Ifthe address packet requesting the access right is being conveyed in BCmode, the memory subsystem does not need to do anything. If the addresspacket requesting the access right is being conveyed in PTP mode, thememory subsystem may forward a response packet to the owning device.

If an address packet is received requesting an access right to acoherency unit for which the response information is No and the currentgTag is gI, the memory subsystem may be configured to forward therequest to an interface (e.g., in the form of a REP packet in someembodiments). When the current gTag is gS, the response information isNo, and an address packet requesting write access is requested, thememory subsystem may forward the request to an interface (e.g., as a REPpacket). If the current gTag is gS, the response information is No, andan address packet requesting read access is requested, the memorysubsystem may allow the transaction to complete internally to the node.

If the requested coherency unit's response information is Yes, thememory subsystem is the owner of the requested coherency unit (and thusthe gTag for that coherency unit is gM), and the memory subsystem isconfigured to respond to the address packet by providing datacorresponding to the requested coherency unit to the requesting device.In response to each request, the memory may be configured to update theresponse information accordingly (e.g., if the response information isYes and a local RTO request is received, the memory subsystem may updatethe response information to No). Note that in order to guarantee thatthe memory subsystem's response information is correct, an active devicewith ownership of and shared access to a coherency unit may not beallowed to silently upgrade to write access to that coherency unit.

The home node for each coherency unit may also track which node, if anyis currently the gM node for that coherency unit. In some embodiments,the home memory subsystem 144 in the home node may track the gM node.This information may also be cached by an interface 148 in the homenode. For example, the home agent 804 in each interface 148 may operateto track the identity of the gM node for home coherency units in aglobal information cache 850. Whenever a transaction causes the identityof the gM node for a particular coherency unit to change, the home agent804 in the coherency unit's home node may update the node ID of the gMnode to identify the new gM node. The home agent may also send anaddress packet (e.g., PMW) to the home memory subsystem 144 to updatethe memory's identifier of the gM node.

Looking at FIG. 20, assume processing subsystem 142AC has write accessto a coherency unit whose home node is node 140A. The coherency unit isnot LPA in node 140C (i.e., the coherency unit is not mapped by eithermemory subsystem 144CA and 144CB in node 140C). The interface 148A inthe home node 140A may store global information for the coherency unitindicating that node 140C is the gM node in its global information cache850. If processing subsystem 142BC in node 140C requests write access tothe coherency unit by sending an RTO packet on the address network 150C,the RTO request may be forwarded by interface 148C to the interface 148Ain the home node 140A. The home agent 804 in the interface 148A mayaccess the global information cache 850 and determine that therequesting node 140C is the gM node for the coherency unit. Since therequesting node 140C is the gM node, the home agent 804 may not initiateany subtransactions for the coherency unit within the home node 140C orsend any communication messages to other nodes. The home agent 804 ininterface 148A may return a NACK coherency message to the interface 148Cin the requesting node 140C, indicating that an owning device(processing subsystem 142AC) within the requesting node will satisfy thecoherency transaction. The interface 148C may responsively remove arecord corresponding to the transaction from its outstanding transactionqueue 814, ending its participation in the RTO transaction. Theprocessing subsystem 142AC may supply requesting processing subsystem142BC with a DATA packet in response to the RTO packet, satisfying theRTO transaction.

In other situations, the requesting node 140C may not be the gM node.For example, when processing subsystem 142BC sends the RTO packet on theaddress network 150C, processing subsystem 142AB may have ownership andwrite access to the coherency unit, and thus node 140B may be the gMnode. When the RTO is forwarded to the interface 148A in the coherencyunit's home node, the interface 148A may access its global informationcache 850 to determine that the gM node is node 140B and responsivelysend a coherency message indicating the RTO request to the slave agentin interface 148B. When the RTO is satisfied in node 140C, interface148A may also update its global information cache to indicate that node140C is the new gM node for the coherency unit and send a PMW packet tothe home memory subsystem for the coherency unit to update the node IDof the gM node in the home memory subsystem. In response to thecoherency message indicating the RTO request from interface 148A,interface 148B may send a PRTOM on the address network 150B to removeownership of the coherency unit from processing subsystem 142AB and tocause processing subsystem 142AB to forward a DATA packet containing thecoherency unit to interface 148B. Interface 148B may then send thecoherency unit to interface 148C for conveyance to processing subsystem142BC to satisfy the RTO transaction.

In yet other situations, there may not be a gM node when an RTOtransaction is initiated. In situations where the global informationcache indicates that there is no gM node, the interface 148A may sendappropriate packets and/or coherency message to cause a non-owningdevice (e.g., a home memory subsystem for the specified coherency unit)to provide data in response to the RTO. For example, nodes 140A and 140Bmay both be gS nodes when processing subsystem 142AC sends an RTO packeton address network 150C. Node 140C may be a gI node for the coherencyunit when the RTO packet is sent. As in the above examples, interface148C may forward a coherency message indicating the RTO to the interface148A in the home node. In response to the coherency message, theinterface 148A may access its global information cache and determinethat there is no gM node for the specified coherency unit. Thus, even ifthe coherency message indicating the RTO was broadcast to all of thenodes 140 in the system 100, and even if each node's interface 148 sentan address packet indicating the RTO on that node's address network 150,no device would respond to the RTO. However, the interface 148A mayensure that a home memory subsystem in the home node 140A (or in therequesting node 140C if the requesting node is an LPA and gS node)provides a copy of the coherency unit in response to the RTO by sendingan appropriate packet on the address network 150A and/or coherencymessage on the inter-node network 154. In this example, the interface148A may send a PRTO packet on the address network 150A to cause thehome memory subsystem in node 140A to respond with a DATA packet. If therequesting node 140C had been an LPA gS node, the interface 148A maysend a coherency message to interface 148C indicating that interface148C should send an address packet (e.g., a PU packet) to cause the homememory subsystem in node 140C to supply the data for the RTO.

As the above examples show, owned lines between nodes in a multi-nodesystem may not be needed if the home node for each coherency unit tracksthe identity of the gM node (if any). For example, if the requestingnode is the gM node, the home node uses the gM node ID to notify therequesting node that another node will not supply the data for anoutstanding transaction (i.e., indicating that the transaction cancomplete internally to the requesting node). When the requesting node isnot the gM node, the interface in the home node may use the cached nodeID of the gM node to determine which node contains a device that willrespond to the RTO and forward the RTO request to that node.Additionally, since transactions that involve multiple nodes are routedthrough the coherency unit's home node, the interface 148 in the homenode is able to identify transactions that the identity of the gM nodeto change and to responsively update the node ID of the gM node in theglobal information cache 850.

Deriving Global Access State from Memory Response Information

Instead of maintaining both memory response information and globalaccess state information, some embodiments of a multi-node computersystem 100 may include memory subsystems 144 that do not maintain globalaccess state information. Interfaces 148 may use the values of thememory subsystem's response information before and after receipt of aparticular address packet to derive the global access state of the nodewith respect to a coherency unit specified in the address packet. Byhaving each interface 148 derive global access state information from amemory subsystem's response information, the number of status bitsmaintained for each coherency unit in memory subsystems 144 may bereduced.

In one embodiment, a memory subsystem may maintain two bits of responseinformation per coherency unit. FIG. 36 shows four exemplary responsestates that may be defined: mR, mN, mS, and mI. The response states maybe defined so that the memory subsystem may determine how to respondbased solely on the response information in one embodiment. Note thatother embodiments may also use the gTags when deciding how to respond,however. These states may take pending transactions into account, sothat if a currently pending transaction will perform inter-nodecoherency activity needed for a later transaction, the later transactionis not forwarded to an interface.

In this embodiment, the memory does not respond to requests forcoherency units whose response information is mN (No Response) becausethis state indicates that an active device within the node is thecurrent owner of the requested coherency unit. If the request isconveyed in PTP mode, the memory subsystem may forward the request tothe owning active device. A memory subsystem may update its responseinformation for a coherency unit to mN each time an RTO request for thatcoherency unit is received from an active device within a node, even ifsatisfying the RTO involves communicating with another node. If a latertransaction for an access right to that coherency unit is initiatedwithin the node before the RTO is completed (i.e., before the gTag ofthe node is Modified), the memory subsystem may, based on the responseinformation being mN, allow the device that initiated the RTO to respondto the later transaction (e.g., the device that initiated the RTO maysubsequently provide the device that initiated the later transactionwith a data packet corresponding to the coherency unit) instead offorwarding the later transaction to an interface. Thus, when the gTagfor a coherency unit has a value other than Modified, response state mNindicates that any inter-node coherency activity needed to satisfy atransaction for an access right to the coherency unit will be performedby a currently pending transaction.

If the requested coherency unit's response information is mR (Response),it indicates that the memory is the owner and that the memory shouldrespond with data corresponding to the requested coherency unit. Amemory subsystem may update its response information for a coherencyunit to mR in response to transactions that transfer ownership of thecoherency unit from an active device to the memory subsystem (e.g., WS,RTWB, and WB).

In response to requests specifying coherency units whose responseinformation is mS (Shared), the memory subsystem may respond to requestsfor shared access (e.g., RTS, RS). However, since devices in other nodesmay have shared copies, the memory subsystem cannot respond to requestsfor write access (e.g., RTO, WS, and RTWB) since shared copies in othernodes may need to be invalidated before write access is appropriatewithin the node. A memory subsystem may update its response informationto mS in response to remote transactions that demote the gTag for acoherency unit from gM to gS (e.g., PRTSM) or in response totransactions initiated within the node that upgrade the gTag from gI togS (e.g., an RTS that cannot be completed within the node).

If the response information for a coherency unit is ml (Invalid), thememory subsystem forwards all coherence requests for that coherency unitto an appropriate interface. The memory subsystem may set its responseinformation for a coherency unit to mI in response to proxy packetsidentifying remote invalidating requests (e.g., PRTO, PRTOM, PI, PIM)for that coherency unit.

Generally, assuming no outstanding transactions for a coherency unit, ifthe response information for that coherency unit in a particular node ismN or mR, the node is the gM node for that coherency unit. Similarly, ifthe coherency unit's response information is mS, the node is a gS node,and if the coherency unit's response information is mI, the node is a gInode for that coherency unit. Whenever a coherency unit is involved inan outstanding transaction, however, the coherency unit's responseinformation may not provide a correct indication of its current gTag.For example, if an RTO initiated within a gS LPA node is stilloutstanding, the response information for the requested coherency unitin the home memory subsystem in that node may be mN, even though thegTag of that coherency unit is still gS.

Whenever a memory subsystem 144 forwards a REP packet corresponding toan RTO to an interface 148, the memory subsystem may include the mTag ofthe coherency unit in the REP packet. For example, if the memorysubsystem's current mTag for a coherency unit is mI when an RTO isreceived, the memory subsystem may update its mTag to mN. The memorysubsystem may forward a REP packet to the interface indicating the RTOand that the prior mTag was mI and the subsequent mTag is mN. Theinterface may be configured to determine the current gTag of thecoherency unit from the mTags and the records contained in theinterface's outstanding transaction queue 814. The interface may use thecurrent gTag when determining what type of proxy packet to send on theaddress network when initiating subtransactions (if the home node hasnot provided such an indication in the coherency message requesting thesubtransaction) and/or when determining whether a locally-initiatedtransaction can be satisfied locally or whether the interface needs tosend a coherency message to the home node as part of the transaction. Ifthe memory subsystem has forwarded a REP packet for an RTO for aparticular coherency unit and the memory subsystem updates the mTag forthat coherency unit (e.g., in response to a WB or other address packetthat causes a change in mTag value), the memory subsystem may forward anew REP packet indicating that the “new” mTag value stored with therecord corresponding to the RTO should be updated to reflect the updateat the memory subsystem. The interface may responsively update itsrecord corresponding to the RTO in the outstanding transaction queue.

Write Back Transactions within a Multi-Node System

An active device may perform a WB (Write Back) transaction for acoherency unit that is not LPA in the active device's node (i.e., nomemory in that node maps that coherency unit). In order for an activedevice to be able to initiate a WB transaction, that active device hasto have ownership of the specified coherency unit. In order for thatactive device to have gained ownership of the coherency unit, the nodecontaining the active device must be the gM node for that coherencyunit. However, the owning device within the node loses ownership of thecoherency unit upon receipt of its own WB address packet, which istransmitted in broadcast mode by the address network in a non-LPA node.Additionally, in a non-LPA node, there is no memory subsystem to gainownership of the coherency unit during the WB transaction. Thus, duringa WB transaction, a gM node that is not an LPA node for the specifiedcoherency unit will not contain an owning device, even though the nodewill still be the gM node for that coherency unit until the WBtransaction completes. This may cause problems if, for example, a slaveagent 806 in an interface 148 within the gM node initiates a PRTOM,PRTS, PRSM, or PIM subtransaction for that coherency unit. When theactive device receives the PRTOM, PRTS, PRSM, or PIM, the active devicemay no longer have an ownership responsibility (e.g., if it has alreadyreceived its own WB address packet from the address network). As aresult, the active device may not respond to the subtransaction andthere may not be an active device within the node that will provide theslave agent 806 in the interface 148 with a data packet in response tothe PRTOM, PRTS, PRSM, or PIM.

In order to avoid situations where there is no active device to respondto a gM-type proxy request from an interface 148, a slave agent 806 inan interface 148 in a non-LPA gM node may be configured to respond torequests for a given coherency unit when there is currently no owningactive device within that node 140. For example, as part of eachsubtransaction that requires a response, a slave agent 806 in aninterface 148 may search through the outstanding transaction queue 814in order to determine whether an owning device within the node willrespond to the interface's proxy request. If there is no owning device,the slave agent 806 in the interface 148 may behave as if the interface148 is the owner of the requested coherency unit by responding to theproxy request with data. For example, in some embodiments, an interface148 within a node that is gM and non-LPA for a particular coherency unitmay behave like an owning active device if there is a pending WBtransaction in order to satisfy outstanding requests for access to thecoherency unit identified in the WB transaction.

Some embodiments of an interface 148 may use the outstanding transactionqueue 814 as a promise array-type structure in order to trackoutstanding requests for particular coherency units for which theinterface may have an ownership-like responsibility. As described above,the outstanding transaction queue may store records corresponding torequests for coherency units that are not LPA within the node andrecords corresponding to requests for LPA coherency units that a memoryhas identified as needing the intervention of interface 148 in order tobe satisfied (e.g., based on global access state and/or responseinformation maintained by a home memory subsystem within that node).Each time slave agent 806 sends certain types of proxy request packets,the slave agent 806 may search the outstanding transaction queue 814 foroutstanding transactions that the interface 148 may be responsible forresponding to and, if any such outstanding transactions are found, sendappropriate data packets on the data network. Thus, the interface 148may send data packets in response to records in the outstandingtransaction queue 814 similarly to an active device sending data packetsin response to promises in promise array 904.

FIG. 37 shows how a WB transaction may be handled in one embodiment of amulti-node computer system. In this embodiment, a multi-node computersystem includes a requesting node 140H in which a device D1 isrequesting read access to a coherency unit. In this example, therequesting node 140H is also the home node for the requested coherencyunit (note that requests for a given coherency unit may also beinitiated in non-home nodes, as shown above). The requesting device D1initiates a RTS transaction by sending a RTS address packet on theaddress network. The address network conveys the RTS (in BC or PTP mode)to the home memory subsystem M for the requested coherency unit. Inresponse to determining that another node is the gM node for therequested coherency unit (e.g., as indicated by the response informationand/or gTag associated with the coherency unit), the home memorysubsystem M forwards the request (e.g., in the form of a REP packet) tothe interface 148H that communicates with the node 140S that has theownership responsibility. The interface 148H may add a recordcorresponding to the REP packet to its outstanding transaction queue.

When the interface 148H in the home node handles the recordcorresponding to the RTS, the request agent in interface 14811 sends aHome RTS coherency message (not shown) to the home agent in interface148H. The home agent may lock the coherency unit, access its globalinformation cache to determine the node ID of the gM node 140S for thecoherency unit, and responsively send a Slave RTS to the gM node 140S.

Slave node 140S is not an LPA node for the specified coherency unit. Atsome time prior to interface 148S's receipt of the Slave RTS coherencymessage, a device D2 may have initiated a WB transaction for the samecoherency unit (address and data packet transfers that are part of theWB transaction are shown in dashed lines). Since the WB involves anon-LPA coherency unit, a record corresponding to the WB transaction maybe stored in interface 148S's outstanding transaction queue. Interface140S has not begun handling the WB transaction when interface 140Sbegins handling the Slave RTS coherency message. However, the addressnetwork may have already returned the WB address packet to the device D2that initiated the WB, causing D2 to lose ownership of the specifiedcoherency unit.

In response to receipt of the Slave RTS coherency message from node140H, interface 148S may send a PRTSM on the address network in slavenode 140S. While handling the Slave RTS subtransaction, interface 148Smay examine the records in its outstanding transaction queue (or in asimilar promise-array type structure) to see if any of the recordsspecify the coherency unit being requested in the outstandingtransaction queue. In response to seeing the record corresponding to theWB transaction, the interface 148S determines that no active devicewithin node 140S may respond to the PRTSM and that the interface mayneed to handle the WB in order to satisfy the PRTSM. The interface sendsa PRN data packet to device D2 in order to complete the WB. In somesituations, D2's response to the PRN may be a NACK packet (indicatingthat D2 no longer has ownership of the specified coherency unit), andthe interface may assume that D2 lost ownership as part of antransaction for write access initiated by another device in the nodebefore D2 received its own WB packet (i.e., assuming there are no moreWB's in the outstanding transaction queue, a NACK response indicatesthat another device within the node owns the coherency unit and willrespond to the PRTSM). However, in this example, device D2 responds tothe PRN by sending a DATA packet containing D2's copy of the specifiedcoherency unit and giving up its access right to the coherency unit.

In response to receiving the DATA packet, interface 148S may behave likean owning active device with respect to the specified coherency unit.Interface 148S may continue examining records specifying the coherencyunit in its outstanding transaction queue until it sees the recordcorresponding to the PRTSM. If any records in the outstandingtransaction queue specify the requested coherency unit, interface 148Smay respond to those records by sending data packets in the same mannerthat an active device would. For example, if the interface sees a recordcorresponding to a RTS transaction initiated within node 140S for thatcoherency unit, interface 148S may send a DATA packet to the requestingdevice. If the interface sees a record corresponding to a RTOtransaction, the interface may respond with a DATA packet. Additionally,if the interface sees a record corresponding to an RTO transactionbefore it sees the record corresponding to the PRTSM, the interface maydetermine that the device that initiated the RTO will respond to thePRTSM (e.g., because the device that initiated the RTO storedinformation corresponding to the PRTSM in its promise array), assumingno other non-NACKed WBs are found in the outstanding transaction queue.

Once the interface has searched its outstanding transaction queue forrecords identifying the coherency unit requested in the RTS transactioninitiated by D1, the interface may determine how to respond to D1's RTS.If, as in the example of FIG. 37, the interface discovers a non-NACKedWB and no intervening RTOs, the interface may respond to the Slave RTScoherency message by sending a Data coherency message containing thedata received from device D2. In response to receiving the Datacoherency message, the interface 148H in the home node may supply a DATApacket to the initiating device D1. Upon sending the DATA packet, therequest agent in the interface 148H may send an Acknowledgment coherencymessage (not shown) to the home agent in interface 148H so that the homeagent releases the lock on the coherency unit.

FIG. 37A shows one embodiment of a method an interface may use to handlesituations where there is no owning device in a gM non-LPA node. In thisembodiment, the interface maintains an outstanding transaction queuethat may be used as a promise array when there is no owning device andthe interface's node is gM. The interface adds records to theoutstanding transaction queue in response to determining that interfaceintervention may be needed for certain transactions. As described above,records may be added for each address packet that specifies a non-LPAcoherency unit and for each REP address packet received from a memorysubsystem.

As part of handling certain transactions, the slave agent in theinterface goes through its outstanding transaction queue. For example,as shown at 500, the interface may send a PRTOM, PRTSM, PIM, or PRSM toinitiate a subtransaction when the node that includes the interface isthe gM node for the specified coherency unit. Each of these packetscauses an active device with an ownership responsibility for thecoherency unit, if any, to respond with a data packet on the datanetwork.

The interface may maintain a response state (true or false) for eachsubtransaction indicating whether the interface is responsible forresponding to requests for the coherency unit with a data packet on thedata network. Initially, this response state (“respond”) may be set tofalse, as indicated at 502, indicating that an owning device existswithin the node. If a record is encountered that indicates that there isno longer an owning device within the gM node, the response stateinformation may be updated to true, indicating that the interface shouldrespond to outstanding requests for the coherency unit.

The interface may begin going through its outstanding transaction queue(OTQ), searching for records that specify the same coherency unit as theproxy packet sent at 500, beginning with the oldest record (e.g., thefirst record in a FIFO outstanding transaction queue) and continuinguntil the record corresponding to the proxy packet sent at 500, asindicated at 504 and 506. As shown at 508, the interface may handle thecurrent record differently depending on the current value of itsresponse state information and the type of transaction to which thecurrent record corresponds. If the current record specifies an RTO andthe interface has a duty to respond as an owning device to transactionsspecifying the coherency unit (as indicated by respond being set totrue), the interface may send a data packet corresponding to thecoherency unit on the data network and transition respond to false,since the active device initiating the RTO will gain ownership of thecoherency unit upon receiving its own RTO packet. The interface may thenremove the record from the outstanding transaction queue since nointer-node activity is needed to complete the RTO transaction. If therecord specifies an RTO and respond is set to false, the interface mayleave the record in the outstanding transaction queue and send acoherency message indicating the RTO to the coherency unit's home nodewhen that record is subsequently handled by the interface's requestagent.

If the current record corresponds to an RS or RTS request for sharedaccess to the coherency unit, the interface may send a data packetcorresponding to the coherency unit if the current response stateinformation is set to true. The interface may then remove the recordfrom the outstanding transaction queue. If the interface's responsestate information is false, the interface may leave the record in theoutstanding transaction queue for subsequent handling by the requestagent.

If the current record corresponds to a WB or WBS, the interface may senda PRN packet on the address network. If the interface receives a DATApacket in response to the PRN, the interface may buffer the coherencyunit received in the DATA packet for use in responding to other requestsand set the value of its response state information to true. If the PRNis NACKed, the interface may not buffer any data or set its responseinformation to true, since the received NACK data packet may indicatethat another device within the node gained ownership of the coherencyunit before completion of the WB or WBS. Once the DATA or NACK packet isreceived, the interface may remove the current record from theoutstanding transaction queue.

If the current record corresponds to a WS or RTWB and the interface'sresponse state information is currently set to false, the interface maytransition its response state information to true and send a PRN datapacket. The interface may responsively receive a DATA packet containingan updated copy of the coherency unit from the device performing the WSor RTWB. The interface may store the coherency unit in a buffer for usein responding to other requests. The interface may then remove thecurrent record from the outstanding transaction queue.

If the current record corresponds to a WS or RTWB and the response stateinformation is currently set to true, the interface may send a PRACKdata packet if the record corresponds to a WS or a DATAP data packet ifthe record corresponds to a RTWB. The DATAP data packet may contain acopy of the coherency unit retrieved from a buffer in the interface(e.g., the coherency unit may be stored in the buffer in response toreceiving a DATA packet as part of a WB, WBS, WS, or RTWB, as describedabove). The interface may then remove the current record from theoutstanding transaction queue.

If the current record does not correspond to one of the types oftransactions listed above, the interface may not perform any actions orupdate its response state information. Once the current record isexamined and, if necessary, responded to, the interface may search forthe next oldest record in the outstanding transaction queue specifyingthe coherency unit, as indicated at 510.

Once all of the records specifying the coherency unit between the oldestrecord and the record corresponding to the packet sent at 500 have beenexamined, the interface may, at 512, determine whether any active devicewill respond to the proxy packet sent at 500 and send a coherencymessage to the home or requesting. If the interface's response stateinformation is false, the interface expects an active device to return adata packet in response to the proxy packet. Upon receipt of that datapacket, the interface may send a coherency message containing the dataon the inter-node network to the requesting node that initiated thetransaction of which the subtransaction initiated at 500 is a part. Ifthe interface's response state information is true, the interface maydetermine that no active device will send a data packet in response tothe proxy packet sent at 500. Accordingly, the interface may include thebuffered data (e.g., buffered in response to a WB, WBS, WS, or RTWB asdescribed above) in a coherency message sent to the requesting node.

Write Stream Transactions within a Multi-Node System

In a single node system, the home memory subsystem takes ownership ofthe coherency unit during a WS transaction involving that coherency unit(e.g., in response to receiving the WS address packet). As part of a WStransaction in a single node system, the home memory subsystem typicallysends a PRN and, if the memory is the prior owner of the coherency unit,an ACK representing the coherency unit to the initiating device.However, in a multi-node system, performance of WS transactions in anLPA node may be complicated because the node may be gI or gS, which mayprevent the home memory subsystem from sending the ACK data packet thatrepresents the coherency unit to the active device that initiates the WSuntil the node becomes the gM node. Additionally, the memory subsystemmay lack a promise array type structure to track its duty to send suchan ACK once the node becomes the gM node.

In some embodiments, a memory subsystem 144 in a node that is gS or gIand LPA for the specified coherency unit may handle a WS transaction byforwarding a WS request (e.g., in the form of a REP packet) to aninterface 148 and updating the memory subsystem's response informationto indicate that the memory should not respond to requests for thatcoherency unit. The interface 148 may then initiate the inter-nodeactivity needed to invalidate shared copies in other nodes, get an ACKfrom the owner in another node (or from the home node if there is no gMnode) and, once other shared/owned copies of the coherency unit areinvalidated, send an ACK and a PRN (e.g., as a combined PRACK datapacket) to the initiating device within the node. The interface may useits outstanding transaction queue 814 to track the interface'sresponsibility to send the ACK and PRN to the initiating device.

FIG. 38 shows how a WS transaction for a coherency unit may beimplemented in one embodiment. In the illustrated example, a multi-nodesystem includes requesting node 140H, which is also the home node forthe coherency unit involved in the WS transaction, and a slave node140S, which is a gS node for the coherency unit when the WS transactionis initiated. Home node 140H includes an active device D1, a home memorysubsystem M, and an interface 148H. Slave node 140S includes an activedevice D2, which initially has read access to and no ownershipresponsibility for the coherency unit, and an interface 148S.

Device D1 in the home node 140H initially has neither access to norownership of the coherency unit. D1 initiates a WS transaction to gainA, All Write, access to the coherency unit by sending a WS addresspacket on the address network. In this embodiment, D1 uses the same typeof address packet to initiate the WS as D1 would use in a single nodesystem. In this example, the address network in the home node 140Hconveys the WS packet in point-to-point mode to the home memorysubsystem M for the coherency unit. In response to node 140H being a gSnode for the coherency unit, the memory subsystem forwards a REP packetcorresponding to the WS to the interface 148H and updates the itsresponse information to a no response state (e.g., to No if two responsestates are maintained or, if four response states are maintained, toml). By updating the response information, the memory subsystem M willcause itself to forward a REP packet corresponding to certain types ofsubsequently received non-proxy address packet specifying that coherencyunit to the interface 148H.

In response to the REP packet, interface 148H adds a recordcorresponding to the WS to its outstanding transaction queue. Wheninterface 148H handles the record, a request agent in interface 148H mayforward a Home WS coherency message (not shown, since no coherencymessage may be sent on the inter-node network) to the home agent ininterface 148H. The home agent may lock the coherency unit and beginhandling the Home WS request. The home agent may identify that the homenode is gS for the requested coherency unit and responsively send a PIpacket to the memory subsystem M. If the PI is conveyed inpoint-to-point mode, as shown in the illustrated example, the memorysubsystem M may receive the PI packet and responsively send an INVpacket to interface 14811 and to any active devices within the home nodethat may have read access to the coherency unit. The memory subsystemmay also send an ACK data packet representing the coherency unit to theinterface 148H. The memory subsystem may also update the gTag for thecoherency unit to gI.

When the interface 148H receives the INV address packet and the ACK datapacket, the home agent in the interface 148H may send a Prack coherencymessage (not shown) to the request agent in interface 148H and a SlaveInvalidate message to each slave node 140S that may have a valid sharedcopy of the coherency unit. The home agent may include a count in thePrack coherency message indicating how many nodes received SlaveInvalidate messages. Note that if the requesting node is not the samenode as the home node and the requesting node is gS, the slave agent inthe requesting node may also be sent a Slave Invalidate message.

Note that if the home agent instead identifies the home node as gM forthe requested coherency unit, the home agent may send a PIM packet onthe address network and, in response to receiving the ACK, PIM (in BCmode), or the ACK, WAIT, and INV (in PTP mode), send a Prack coherencymessage to the request agent in interface 148H. If the home node is gI,the home agent may send a Slave WS to the gM node for the coherency unitand a Prn coherency message to the request agent.

The interface 148S in slave node 140S receives the Slave Invalidatemessage from the home node 140H and responsively sends a PI message onthe address network in slave node 140S. In this example, the PI isconveyed in BC mode in node 140S. In response to the PI, active deviceD2 transitions its read access right to invalid. In response toreceiving the PI, the interface 148S sends to the requesting node 140Han Ack coherency message indicating that shared copies of the coherencyunit in slave node 140S have been invalidated.

In this example, the request agent in the home node waits to send aPRACK data packet to the initiating device D1 until receiving a numberof Ack coherency messages equal to the number indicated in the Prackcoherency message received from the home agent. Upon receiving therequisite number of Acks, the interface 148H sends a PRACK data packetto the initiating device, granting the initiating device the A (AllWrite) access right to the coherency unit. The initiating deviceresponsively sends a DATA packet containing an updated copy of thecoherency unit to the interface 148H. In response to the DATA packet,the request agent in the interface 14811 sends a Data/Acknowledgmentcoherency message (not shown) to the home agent in interface 148H. Inturn, the home agent may send a PMW to home memory M to update the gTagof the home node to gM and to update the memory subsystem's copy of thecoherency unit. In response to the PMW, the memory subsystem M sends aPRN, causing the interface 148H to send a DATAM packet containing theupdated copy of the coherency unit received from D1 and the new globalinformation for the coherency unit. The home agent in interface 148H mayrelease the lock on the coherency unit upon completion of the WStransaction.

Remote-Type Address Packets

Although the above description notes that in some embodiments, activedevices may not be aware of whether they are included in multi-nodesystems and/or aware of which coherency units are LPA, embodiments arecontemplated in which active devices are aware of both of theseconditions. In some such embodiments, active devices may be configuredto initiate different types of transactions dependent on whether theactive devices are included in multi-node systems and/or whether thecoherency unit being requested is an LPA coherency unit. For example, anactive device may initiate WS, WB, and WBS transactions using differenttypes of packets depending on whether the active device is included in amulti-node system. If the active device is included in a single nodesystem, the active device may initiate WS, WB, and WBS transactions bysending packets having command encodings of WS, WB, and WBS as describedabove. If the active device is instead included in a multi-node system,the active device may initiate the same transactions using anappropriate one of the “remote” command encodings shown in FIG. 39.

In FIG. 39, three remote packet types are shown: RWB, RWBS, and RWS.Remote packet types are used by active devices in multi-node systems insome embodiments. A RWB, or Remote WB, packet includes a RWB commandencoding. The RWB command encoding differs from the WB command encodingthat an active device may be configured to use when included in a singlenode system. In some embodiments, an active device in a multi-nodesystem may only use the RWB type of packet when the active device isinitiating a WB for a non-LPA coherency unit. If the active device isinitiating a WB for an LPA coherency unit, the active device may use thenon-remote WB type of packet.

The RWBS, or remote write back shared, packet includes a RWBS commandencoding. The RWBS type of packet may be used in a multi-node system toinitiate a write back shared transaction in which a shared access rightto the coherency unit is retained by the initiating device uponcompletion of the write back shared transaction. As with the RWB packet,in some embodiments, an active device in a multi-node system may onlyuse the RWBS type of packet when the active device is initiating a WBSfor a non-LPA coherency unit. If the active device is initiating a WBSfor an LPA coherency unit, the active device may use the non-remote WBStype of packet.

The RWS, or remote WS, packet includes a RWS command encoding. The RWStype of packet may be used by an active device whenever the activedevice detects that the active device is included in a multi-nodesystem. The active device may use the RWS type of packet wheneverincluded in a multi-node system, regardless of whether the requestedcoherency unit is LPA or non-LPA in the active device's node.

The interface 148 in the same node as the active device initiating aRWB, RWBS, or RWS may be configured to send a coherency message to thehome node for the specified coherency unit in response to receiving theRWB, RWBS, or RWS type of packet. All other non-interface clientdevices, including the initiating active device, may ignore remote-typeaddress packets, and thus these types of address packets may beconsidered to be conveyed in a logical point-to-point mode by theaddress network. Accordingly, remote-type address packets do not causechanges in ownership or in access rights at any client device.

In response to receiving a remote-type packet, the interface 148 maysend a coherency message indicating the remote-type transaction to thehome node. The home node may responsively lock the specified coherencyunit and send one or more coherency messages to the requesting node andany other slave nodes whose participation in the transaction may benecessary. In response to receiving a responsive coherency message fromthe home node, the interface 148 in the requesting node may send a proxyaddress packet and, in RWS transactions, a data packet to effect thedesired coherency activity within the requesting node. In the case of aRWB, the interface 148 may send a PRTOM (or a PRTSM if a RWBS isrequested) to invalidate shared copies within the node, to removeownership, and to obtain a DATA packet corresponding to the coherencyunit. Note that unlike in a non-remote WB transaction, a RWB that uses aPRTOM (or RWBS that uses a PRTSM) may avoid situations in which thewrite back can be NACKed. Thus, if another active device has gainedownership of the coherency unit before the interface sends the PRTOM inresponse to the RWB, the PRTOM may remove ownership from the new ownerof the coherency unit, not from the active device that initiated theRWB. In WS transactions, the interface 148 may send a PI or PIM addresspacket (depending on the gTag of the requesting node). Upon receivingthe PI or PIM packet (indicating that any other copies of the coherencyunit have been invalidated) and receiving a token representing thecoherency unit (either from an owning device within the node or from thegM node), the interface may send a PRACK data packet to the initiatingdevice. In response to the PRACK, the requesting device gains the Aaccess right to the coherency unit and sends a DATA packet containingthe updated coherency unit to the interface. Upon receiving a DATApacket in RWS, RWB, and RWBS transactions, the interface 148 may send acoherency message containing the data and acknowledging satisfaction ofthe remote-type transaction to the home node so that the home node canupdate its copy of the coherency unit and/or global information for thecoherency unit. The home node may also release the lock on the coherencyunit in response to the coherency message from the requesting node.

In RWB and RWBS transactions, the proxy address packet sent by theinterface 148 may have a different transaction ID than the RWB or RWBSpacket sent by the initiating device. As a result, the requesting devicemay be unable to match the proxy address packet sent by the interface tothe earlier transaction. As a result, the initiating device may beconfigured to deallocate resources allocated to the RWB or RWBStransaction and reuse the unique transaction ID assigned to the RWB orRWBS as soon as the initiating device loses ownership of the specifiedcoherency unit. While the initiating device may lose ownership of thecoherency unit in response to the proxy address packet sent by theinterface, the initiating device may also lose ownership beforereceiving the proxy address packet. For example, if another activedevice initiates an RTO for the coherency unit before the interfacesends the proxy address packet, the initiating active device may loseownership upon receiving the RTO.

FIG. 40 illustrates how a RWB transaction may be performed, according toone embodiment. This example illustrates a requesting node 140R and thehome node 140H for the requested coherency unit. The requesting node140R includes an initiating active device D1 that currently has writeaccess to and ownership of the coherency unit. The requesting node 140Ralso includes a second active device D2 that has neither access to norownership of the coherency unit and an interface 148R. The global accessstate of the coherency unit is gM in the requesting node 140R before theRWB transaction. The home node 140H includes an interface 14811 and amemory M that maps the coherency unit. The global access state of thecoherency unit is gI in the home node prior to the RWB transaction.

The initiating active device D1 initiates the RWB by sending a RWBpacket on the address network. D1 may use a RWB type packet to initiatethe transaction in response to determining that the device D1 isincluded in a multi-node system (e.g., as indicated by a setting in amode register included in D1) and that the coherency unit is not LPA innode 140R (e.g., as indicated by the coherency unit's address). Theaddress network in the requesting node 140R may convey the RWB addresspacket in broadcast mode since the RWB packet specifies a non-LPAcoherency unit. However, the RWB is logically seen as a point-to-pointcommunication to the interface 148R since devices D1 and D2 (and allother client devices other than interface 148R) in node 140R ignore theRWB packet.

The interface 148R may receive the logically point-to-point RWB andcreate a corresponding record in its outstanding transaction queue. Whenthe record is handled, the interface 148R may send a coherency message,Home RWB, to the home node 140H. The interface 148H in the home node140H receives the Home RWB coherency message and acquires a lock on thespecified coherency unit. The interface 148H in the home node 140Hdetermines that the requesting node 140R is the gM node for thecoherency unit (e.g., by accessing interface 148H's global informationcache and/or by communicating with the home memory subsystem M) andresponsively sends a Slave RTO coherency message to the requesting node140R. Interface 148H may include an indication of the gTag of thecoherency unit in the requesting node 140R so that the interface 148Rwill know to send a PRTOM packet.

In response to the Slave RTO coherency message, the interface 148R sendsa PRTOM packet on the address network of the requesting node 140R (notethat although not shown, the PRTOM may also be conveyed to D2). Uponreceipt of the PRTOM, D1 loses ownership of the coherency unit andcommits to sending a DATA packet containing the coherency unit to theinterface 148R. D1 may reuse the transaction ID used in the RWB packetupon losing ownership of the coherency unit. Also, upon losingownership, D1 may reuse any resources allocated to the RWB (unless thoseresources are needed to send the DATA packet, in which case thoseresources may be reallocated upon sending the DATA packet). In responseto sending the DATA packet, D1 loses write access to the coherency unit.Upon receiving the PRTOM and the DATA packet, the interface 148R sends aData/Acknowledgment coherency message to the home node 140H thatacknowledges completion of the Slave RTO substransaction within therequesting node 140R and provides a copy of the coherency unit.

Upon receiving the Data/Acknowledgment coherency message from interface148R, interface 148H may send a PMW to the home memory subsystem M toupdate the gTag of the home node to gM and to update the copy of thecoherency unit in the home memory subsystem. The memory subsystem M mayrespond with a PRN data packet, causing the interface 148H to send aresponsive DATAM packet containing the updated copy of the coherencyunit and the new global information for the coherency unit. Theinterface 148H may also update information in its global informationcache to indicate that the home node is the gM node for the coherencyunit. The interface 148H may release a lock on the coherency unit uponcompletion of the RWB transaction.

Note that if, prior to the interface sending the PRTOM, D1 received anRTO packet sent by D2, ownership would transfer from D1 to D2. Wheninterface 148R sent the PRTOM, D1 would not respond (having alreadygiven up ownership). Instead, D2 would lose ownership of the coherencyunit upon receipt of the PRTOM and commit to sending a DATA packet.

If D1 initiates a RWBS instead of a RWB, the transaction may proceedsimilarly to the RWB transaction illustrated in FIG. 40. However,instead of sending a Slave RTO, the interface 148H in the home node 140Hmay send a Slave RTS to the requesting node 140R. Accordingly, interface148R may send a PRTSM instead of a PRTOM. Upon receipt of the PRTSM, theinitiating device still loses ownership of the coherency unit. However,upon sending the DATA packet containing the coherency unit, D1transitions its access right to read access instead of invalid access.Additionally, the gTag of the home node is updated to gS instead of gM.

FIG. 41 illustrates how a RWS transaction may be performed in oneembodiment. FIG. 41 illustrates three nodes, requesting node 140R, homenode 140H, and slave node 140S. Before the RWS transaction, therequested coherency unit is gI in the requesting node 140R, gI in thehome node 140H, and gM in slave node 140S. Requesting node 140R includestwo active devices, D1 and D2, and an interface 148R. Home node 140Hincludes the coherency unit's home memory subsystem M and an interface148H. Slave node 140S includes an interface 148S and an active device D3that has ownership of and write access to the coherency unit.

D1 initially has neither ownership of nor access to the coherency unit.D1 initiates a RWS transaction by sending a RWS address packet on theaddress network. D1 initiates a remote-type WS, as opposed to anon-remote-type WS, in response to determining that D1 is included in amulti-node system (e.g., in response to a setting in a mode registerincluded in D1). The RWS address packet is conveyed logicallypoint-to-point to the interface 148R and is accordingly ignored by allclient devices in the requesting node 140R other than the interface148R. The interface 148R creates a record in its outstanding transactionqueue corresponding to the RWS packet upon receiving the RWS.

When interface 148R handles the record corresponding to the RWS,interface 148R sends a coherency message, Home RWS, to the home node140H for the requested coherency unit. The interface 148H in the homenode 140H obtains a lock on the specified coherency unit in response tothe Home RWS coherency message. The interface 148H may also determinewhich nodes should participate in the RWS (e.g., by sending a PMR tomemory subsystem M to obtain global information associated with thecoherency unit or by accessing a global information cache included inthe interface 148H). The interface 148H may send coherency messages toeach node having a valid copy of the specified coherency message inorder to invalidate those copies. In this example, slave node 140S isthe gM node for the coherency unit, and thus that is the only node inwhich copies need to be invalidated. Accordingly, interface 148H sends aSlave Invalidate coherency message to node 140S. If a valid copy of thecoherency unit had also existed in the home node (e.g., if the home nodewas gS instead of gI), the interface 148H may send a PIM address packetto invalidate local copies of the coherency unit within home node 140Hand to obtain an ACK data packet representing the coherency unit.Similarly, if valid copies of the coherency unit had existed in multipleother gS nodes, the interface 148H may send a Data+Count coherencymessage to the requesting node indicating that number of invalidationAcks the requesting node should receive before sending a ACK data packetto the initiating device D1 and containing a data token representing therequested coherency unit.

Interface 148S in slave node 140S receives the Slave Invalidate messagefrom the home node 140H and responsively sends a PIM address packet onslave node 140S's address network. Upon receipt of the PIM, owningdevice D3 loses its ownership responsibility for the coherency unit andcommits to sending an ACK packet representing the coherency unit tointerface 148S. Upon sending the ACK packet, device D3 transitions itswrite access right to invalid. Upon receiving the PIM and the ACK,interface 148H sends an Ack coherency message containing a tokenrepresenting the coherency message to the requesting node 140R.

In response to the Ack coherency message representing the coherency unitand indicating that other copies of the coherency unit in other nodeshave been invalidated, interface 148 may send a PRACK (combination PRNand ACK) data packet to the initiating device D1. Upon receipt of thePRACK, the initiating device D1 gains A (All Write) access to thecoherency unit and commits to sending a DATA packet containing anupdated copy of the coherency unit to the interface 148R. In response tothe DATA packet, the interface 148R sends a Data/Acknowledgmentcoherency message to the home node 140H indicating that the RWS has beensatisfied within the requesting node 140R and containing the updatedcopy of the coherency unit.

In response to the Data/Acknowledgment coherency message from therequesting node 140R, interface 148H may send a PMW to the home memorysubsystem M to update the gTag for the coherency unit in the home nodeto gM and to update the memory subsystem's copy of the coherency unit.The memory subsystem M may respond with a PRN data packet, causing theinterface 148H to send a responsive DATAM packet containing the updatedcopy of the coherency unit and the new global information for thecoherency unit. Upon completion of the RWS transaction, the interface148H may release a lock on the coherency unit.

Note that if the requesting node 140R had been a gS node for therequested coherency unit when the RWS was initiated, interface 148H maysend a Slave Invalidate coherency message to the slave agent ininterface 148R, causing interface 148R to send a PI address packet toinvalidate shared copies. The Slave Invalidate coherency message sent tothe requesting node 140R may also contain a token representing thecoherency unit and indicate the number of other nodes sent SlaveInvalidate coherency messages. In such a situation, interface 148R maynot send the PRACK to the initiating device until receipt of the PI andreceipt of Ack coherency messages from each other node sent a SlaveInvalidate coherency message.

Promise Arrays within Active Devices in a Multi-Node System

As mentioned above in the description of a single node system, eachactive device may maintain a promise array indicating requests for whichthat active device is responsible for responding with a copy of arequested coherency unit. In some embodiments of a multi-node system, anactive device may be configured to allocate storage in the promise arrayfor an additional promise per interface per coherency unit within theactive device's node in order to avoid deadlock situations that mayarise if inter-dependent transactions or subtransactions are pending indifferent nodes. For example, looking back at FIG. 15, an active devicemay include a fully-sized promise array 904 that, for each outstandinglocal transaction initiated by that active device to gain ownership of acoherency unit, has storage for one promise for each other active deviceand interface within the same node as that active device. As usedherein, a promise is information identifying a data packet to beconveyed to another device in response to a pending local transactioninvolving a coherency unit for which the active device has an ownershipresponsibility.

In alternative embodiments, each active device's promise array 904 maybe less than fully-sized. In such embodiments, each active device may beconfigured to assert flow control on one of the address network'svirtual networks (e.g., on the Request Network) in the event promisearray 904 becomes full (e.g., as indicated when the promise array storesa threshold number of promises) and is (or will soon be) unable to storeadditional information corresponding to additional data promises.Furthermore, another virtual address network, the Interface RequestNetwork, may be implemented. The Interface Request Network may conveyproxy packets sent by interfaces. As noted above, active devices may beable to assert flow control on the non-interface Request Network. Insome embodiments, active devices may not assert flow control on theInterface Request Network. In other embodiments, active devices mayassert flow control on the Interface Request Network but must be able todeassert flow control to the Interface Request Network even if thenon-interface Request Network remains flow controlled. Since flowcontrol on the Interface Request Network may either be prohibited orimplemented independently of flow control on the non-interface RequestNetwork, requests that need to be sent in a first node in order tosatisfy a transaction in another node may be sent on the InterfaceRequest Network, even if an active device in the first node is flowcontrolling the non-interface Request Network. By allowing proxy packetsto progress when the Request Network is flow controlled, deadlock may beavoided.

Numerous variations and modifications will become apparent to thoseskilled in the art once the above disclosure is fully appreciated. It isintended that the following claims be interpreted to embrace all suchvariations and modifications.

1. A multi-node system, comprising: a node including a plurality ofactive devices and an interface coupled by an address network configuredto convey address packets between the interface and the plurality ofactive devices, and a data network configured to convey data packetsbetween the interface and the plurality of active devices, wherein theaddress network and the data network are separate networks; aninter-node network configured to convey coherency messages between theinterface in the node and an additional interface in an additional node,wherein the additional interface is configured to send a coherencymessage requesting a read access right to a coherency unit on theinter-node network, wherein a given active device of the plurality ofactive devices has an ownership responsibility for the coherency unit;wherein the interface is configured to respond to the coherency messageby sending a proxy address packet on the address network; wherein adifferent active device of the plurality of active devices is configuredto request a read access right to another coherency unit by sending anaddress packet on the address network; wherein the given active deviceof the plurality of active devices has an ownership responsibility forthe another coherency unit, wherein the given active device isconfigured to not transition the ownership responsibility for theanother coherency unit in response to the address packet and totransition the ownership responsibility for the coherency unit inresponse to the proxy address packet.
 2. The system of claim 1, whereinthe additional interface in the additional node is configured to sendthe coherency message in response to an additional active deviceincluded in the additional node requesting a read access right to thecoherency unit.
 3. The system of claim 2, wherein the additional activedevice is configured to request the read access right to the coherencyunit by sending an additional address packet on an additional addressnetwork included in the additional node.
 4. The system of claim 2,wherein the given active device is configured to send a data packetcorresponding to the coherency unit on the data network in response toreceiving the proxy address packet, wherein the interface included inthe node is configured to send data corresponding to the coherency unitto the additional interface via the inter-node network in response tothe data packet on the data network.
 5. The system of claim 4, whereinthe additional interface is configured to send an additional data packetcorresponding to the coherency unit on an additional data networkincluded in the additional node in response to receiving the data viathe inter-node network.
 6. The system of claim 5, wherein the additionalactive device is configured to gain the read access right to thecoherency unit in response to receiving the additional data packet fromthe additional data network.
 7. The system of claim 4, wherein the givenactive device is configured to transition an access right to thecoherency unit in response to sending the data packet on the datanetwork.
 8. The system of claim 1, wherein the address packet is aread-to-share packet and wherein the proxy address packet is a proxyread-to-share-modified packet.
 9. The system of claim 1, wherein noother active device in any-node has an ownership responsibility for thecoherency unit subsequent to receipt of the proxy address packet by theactive device.
 10. The system of claim 1, wherein if any active devicein any node has an ownership responsibility for a particular coherencyunit, no other active device in any other node has a valid access rightto the particular coherency unit.
 11. The system of claim 10, wherein ifany active device in any node has a read access right to the particularcoherency unit, no active device in any other node has a write accessright to the particular coherency unit.
 12. A node for use in amulti-node system, the node comprising: an address network configured toconvey address packets and a separate data network configured to conveydata packets; a plurality of active devices coupled to send and receiveaddress packets on the address network and data packets on the datanetwork, wherein a given active device of the plurality of activedevices has an ownership responsibility for a coherency unit; and aninterface coupled to additional nodes in the multi-node system via aninter-node network, wherein the interface is configured to send andreceive address packets on the address network and data packets on thedata network, wherein the interface is configured to receive a coherencymessage from a given additional node via the inter-node network, whereinthe coherency message requests a read access right to the coherencyunit; wherein the interface is configured to respond to the coherencymessage by sending a proxy address packet on the address network;wherein a different active device of the plurality of active devices isconfigured to request a read access right to another coherency unit bysending an address packet on the address network; wherein the givenactive device of the plurality of active devices has an ownershipresponsibility for the another coherency unit, wherein the given activedevice is configured to not transition the ownership responsibility forthe another coherency unit in response to the address packet and totransition the ownership responsibility for the coherency unit inresponse to the proxy address packet.
 13. The node of claim 12, whereinthe given active device is configured to send a data packetcorresponding to the coherency unit on the data network in response toreceiving the proxy address packet, wherein the interface included inthe node is configured to send data corresponding to the coherency unitto the given additional node via the inter-node network in response tothe data packet on the data network.
 14. The node of claim 13, whereinthe given active device is configured to transition an access right tothe coherency unit in response to sending the data packet on the datanetwork.
 15. The node of claim 12, wherein the address packet is aread-to-share packet and wherein the proxy address packet is a proxyread-to-share-modified packet.
 16. A method for use in a multi-nodesystem comprising a node and an additional node coupled by an inter-nodenetwork, the method comprising: the additional node sending a coherencymessage requesting a read access right to a coherency unit on theinter-node network; in response to receiving the coherency message, aninterface included in the node sending a proxy address packet on anaddress network included in the node; an active device included in thenode losing an ownership responsibility for the coherency unit inresponse to receiving the proxy address packet; a different activedevice included in the node requesting a read access right to anothercoherency unit by sending an address packet on the address network; theactive device maintaining an ownership responsibility for the anothercoherency unit in response to the address packet.
 17. The method ofclaim 16, further comprising an additional interface included in theadditional node sending the coherency message in response to anadditional active device included in the additional node requesting theread access right to the coherency unit.
 18. The method of claim 17,wherein said additional node requesting comprises the additional activedevice sending an additional address packet on an additional addressnetwork included in the additional node.
 19. The method of claim 17,further comprising: the active device sending a data packetcorresponding to the coherency unit on a data network included in thenode in response to receiving the proxy address packet; and theinterface included in the node sending data corresponding to thecoherency unit to the additional interface via the inter-node network inresponse to the data packet on the data network.
 20. The method of claim19, further comprising the additional interface sending an additionaldata packet corresponding to the coherency unit on an additional datanetwork included in the additional node in response to receiving thedata via the inter-node network.
 21. The method of claim 20, furthercomprising the additional active device gaining the read access right tothe coherency unit in response to receiving the additional data packetfrom the additional data network.
 22. The method of claim 19, furthercomprising the active device transitioning an access right to thecoherency unit in response to sending the data packet on the datanetwork.
 23. The method of claim 16, wherein the address packet is aread-to-share packet and wherein the proxy address packet is aread-to-share-modified packet.